mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
3223503d3e
* Remove `darwin`-only restriction on `ollama` Hopefully resolves https://github.com/pkgxdev/pkgx/issues/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 <jacob@pkgx.dev>
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
distributable:
|
|
url: git+https://github.com/jmorganca/ollama
|
|
ref: v{{version}}
|
|
|
|
versions:
|
|
github: jmorganca/ollama
|
|
|
|
dependencies:
|
|
curl.se/ca-certs: '*'
|
|
|
|
build:
|
|
dependencies:
|
|
go.dev: ^1.21
|
|
cmake.org: ^3
|
|
git-scm.org: ^2
|
|
script:
|
|
- run: |
|
|
git submodule init
|
|
git submodule update
|
|
if: '>=0.0.18'
|
|
- go generate ./...
|
|
- 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
|
|
# 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'
|
|
- $KILL ollama || true
|
|
env:
|
|
darwin:
|
|
KILL: killall
|
|
linux:
|
|
KILL: pkill -x
|