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

Remove darwin-only restriction on ollama #5284

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions projects/ollama.ai/package.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
distributable:
url: git+https://github.com/jmorganca/ollama
ref: v{{version}}

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

dependencies:
curl.se/ca-certs: '*'

build:
dependencies:
go.dev: ^1.21
Expand All @@ -16,20 +19,37 @@ build:
git submodule update
if: '>=0.0.18'
- go generate ./...
- go build .
- mkdir -p {{prefix}}/bin
- install ollama {{prefix}}/bin/
- go build -ldflags="$GO_LDFLAGS" -o '{{prefix}}/bin/ollama' .
env:
linux:
GO_LDFLAGS:
# else segfaults
- -buildmode=pie

provides:
- bin/ollama

test:
qa-required: true
dependencies:
linux:
gitlab.com/procps-ng/procps: '*'
script:
# 0.0.19 complains about a missing blobs directory
- run: mkdir -p ~/.ollama/models/blobs
if: =0.0.19
- killall ollama || true
# why is this killing the test, it seems like?
- run: pgrep -l ollama
if: linux
- $KILL ollama || true
- sleep 5
- ollama serve &
- sleep 5
- ollama create mario -f ./Modelfile
- ollama list | grep 'mario'
- killall ollama || true
- $KILL ollama || true
env:
darwin:
KILL: killall
linux:
KILL: pkill -x
Loading