Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error message for platform not available is misleading #975

Open
YellowApple opened this issue Feb 19, 2024 · 10 comments · Fixed by pkgxdev/pantry#5284
Open

error message for platform not available is misleading #975

YellowApple opened this issue Feb 19, 2024 · 10 comments · Fixed by pkgxdev/pantry#5284
Labels
bug Something isn't working

Comments

@YellowApple
Copy link

When running pkgx ollama (on Ubuntu 23.10 x86-64):

× unexpected error invalid version: 
│ Error: invalid version: 
│     at https://deno.land/x/[email protected]/src/utils/semver.ts:44:17
│     at Array.flatMap (<anonymous>)
│     at new SemVer (https://deno.land/x/[email protected]/src/utils/semver.ts:25:31)
│     at https://deno.land/x/[email protected]/src/hooks/useInventory.ts:24:55
│     at Array.map (<anonymous>)
│     at Object.get (https://deno.land/x/[email protected]/src/hooks/useInventory.ts:24:46)
│     at eventLoopTick (ext:core/01_core.js:182:7)
│     at async Object.select (https://deno.land/x/[email protected]/src/hooks/useInventory.ts:7:20)
│     at async Promise.all (index 0)
│     at async resolve (https://deno.land/x/[email protected]/src/plumbing/resolve.ts:55:3)
╰─➤ https://github.com/pkgxdev/pkgx/issues/new
@mxcl
Copy link
Member

mxcl commented Feb 19, 2024

worksforme, does this happen every time? It's possible there was an API error. If so then I'll improve the error.

Screenshot 2024-02-19 at 12 48 42 PM

@pkgxdev pkgxdev deleted a comment from dosubot bot Feb 19, 2024
@YellowApple
Copy link
Author

Happens every time for me, yeah. First tried it last week, and tried it again today. Other packages work fine (tested pkgx julia and pkgx zig zen, both of which work as expected); it's just ollama that's giving me trouble.

@mxcl
Copy link
Member

mxcl commented Feb 19, 2024

I don't think this is likely something fixed, but please check your pkgx is the latest version.

After that try getting rid of the http cache: rm -rf ~/.cache/pkgx or XDG_ equivalent. If that fixes it then we have a cache bug.

@jhheider
Copy link
Contributor

platforms:
  - darwin # Available for macOS Windows & Linux support coming soon. <= from https://ollama.ai/

if it works on linux, we need to remove this and get it built.

@YellowApple
Copy link
Author

YellowApple commented Feb 19, 2024

I don't think this is likely something fixed, but please check your pkgx is the latest version.

pkgx --version reports pkgx 1.1.6 (latest AFAICT).

After that try getting rid of the http cache: rm -rf ~/.cache/pkgx or XDG_ equivalent. If that fixes it then we have a cache bug.

Same behavior after running rm -rf ~/.cache/pkgx && pkgx ollama. Also tried rm -rf ~/.cache/pkgx && pkgx --sync && pkgx ollama for good measure, to no avail.

if it works on linux, we need to remove this and get it built.

Ah, then that'd explain it. Yes, it does indeed work on Linux (and I was able to install it manually on this machine, i.e. outside of pkgx). There's allegedly a preview version for Windows nowadays as well (but I haven't tested it).

Is it as simple as removing the platforms: key entirely? Or adding linux to the list? I'd be happy to kick off the PR either way :)

@jhheider
Copy link
Contributor

removing the platforms key, assuming that builds cleanly. it might need tweaks, but we won't know until we try. ;)

@YellowApple
Copy link
Author

Seems to build cleanly, but ollama serve and ollama create mario -f ./Modelfile throw segfaults in CI (only for *nix64; *nix-ARM64 seems to be okay).

@jhheider
Copy link
Contributor

yeah, go required a -buildmode=pie flag. just wrestling with platform-specific testing foibles now.

@YellowApple
Copy link
Author

YellowApple commented Feb 20, 2024

Yeah, I think pkill is matching on the test runner; using pkill -x instead should behave more like killall. Hopefully that's the last piece to get the tests passing (we'll find out in a few minutes; fingers crossed 🤞 ).

(Though I'm surprised that killall ain't available; is that not a standard Linux command?)

jhheider added a commit to pkgxdev/pantry that referenced this issue Feb 20, 2024
* Remove `darwin`-only restriction on `ollama`

Hopefully resolves pkgxdev/pkgx#975

* add -buildmode on linux

* ollama needs certs to pull from model registry

* certs needed at runtime

* add pkill for linux

* test pgrep

* pkill needs -x for exact match

---------

Co-authored-by: Jacob Heider <[email protected]>
@mxcl
Copy link
Member

mxcl commented Feb 20, 2024

ugh, I'm sorry. That I should have checked for rather than have you jump through hoops.

I will reopen to improve the error message.

@mxcl mxcl reopened this Feb 20, 2024
@mxcl mxcl changed the title pkgx ollama fails with "invalid version" error message for platform not available is misleading Feb 20, 2024
@mxcl mxcl added the bug Something isn't working label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants