2023-09-06 21:02:26 +03:00
|
|
|
distributable:
|
2023-09-07 00:10:44 +03:00
|
|
|
url: git+https://github.com/jmorganca/ollama
|
|
|
|
ref: v{{version}}
|
2024-02-20 03:41:19 +03:00
|
|
|
|
2023-09-06 21:02:26 +03:00
|
|
|
versions:
|
|
|
|
github: jmorganca/ollama
|
2024-02-20 03:41:19 +03:00
|
|
|
|
|
|
|
dependencies:
|
|
|
|
curl.se/ca-certs: '*'
|
|
|
|
|
2023-09-06 21:02:26 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
2023-09-07 00:10:44 +03:00
|
|
|
go.dev: ^1.21
|
|
|
|
cmake.org: ^3
|
|
|
|
git-scm.org: ^2
|
2023-09-06 21:02:26 +03:00
|
|
|
script:
|
2023-09-07 00:10:44 +03:00
|
|
|
- run: |
|
|
|
|
git submodule init
|
|
|
|
git submodule update
|
2024-01-03 23:44:23 +03:00
|
|
|
if: '>=0.0.18'
|
2023-09-07 00:10:44 +03:00
|
|
|
- go generate ./...
|
2024-02-20 03:41:19 +03:00
|
|
|
- go build -ldflags="$GO_LDFLAGS" -o '{{prefix}}/bin/ollama' .
|
|
|
|
env:
|
2024-03-22 16:56:08 +03:00
|
|
|
GO_LDFLAGS:
|
|
|
|
- -X github.com/jmorganca/ollama/version.Version={{version}}
|
2024-02-20 03:41:19 +03:00
|
|
|
linux:
|
|
|
|
GO_LDFLAGS:
|
|
|
|
# else segfaults
|
|
|
|
- -buildmode=pie
|
|
|
|
|
2023-09-06 21:02:26 +03:00
|
|
|
provides:
|
|
|
|
- bin/ollama
|
2024-02-20 03:41:19 +03:00
|
|
|
|
2023-09-06 21:02:26 +03:00
|
|
|
test:
|
|
|
|
qa-required: true
|
2024-02-20 03:41:19 +03:00
|
|
|
dependencies:
|
|
|
|
linux:
|
|
|
|
gitlab.com/procps-ng/procps: '*'
|
2023-09-06 21:02:26 +03:00
|
|
|
script:
|
2024-03-22 16:56:08 +03:00
|
|
|
- ollama --version | grep 'client version is {{version}}'
|
2023-09-12 00:43:29 +03:00
|
|
|
# 0.0.19 complains about a missing blobs directory
|
|
|
|
- run: mkdir -p ~/.ollama/models/blobs
|
|
|
|
if: =0.0.19
|
2024-02-20 03:41:19 +03:00
|
|
|
# why is this killing the test, it seems like?
|
|
|
|
- run: pgrep -l ollama
|
|
|
|
if: linux
|
|
|
|
- $KILL ollama || true
|
|
|
|
- sleep 5
|
2023-09-06 21:02:26 +03:00
|
|
|
- ollama serve &
|
|
|
|
- sleep 5
|
|
|
|
- ollama create mario -f ./Modelfile
|
|
|
|
- ollama list | grep 'mario'
|
2024-02-20 03:41:19 +03:00
|
|
|
- $KILL ollama || true
|
|
|
|
env:
|
|
|
|
darwin:
|
|
|
|
KILL: killall
|
|
|
|
linux:
|
|
|
|
KILL: pkill -x
|