diff options
author | Alexander F. Rødseth | 2023-11-19 14:11:08 +0100 |
---|---|---|
committer | Alexander F. Rødseth | 2023-11-19 14:11:08 +0100 |
commit | 30b5b25a6cfac8247e3d276065150568be29b89f (patch) | |
tree | 3a9f774837807eb7d927febcce6789d97f841cf2 | |
parent | 9828ddefed7a906644336f9a7e4b8b3d2ea24fd5 (diff) | |
download | aur-30b5b25a6cfac8247e3d276065150568be29b89f.tar.gz |
upgpkg: 0.1.10-1
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | ollama.service | 20 | ||||
-rw-r--r-- | sysusers.conf | 2 | ||||
-rw-r--r-- | tmpfiles.d | 1 |
5 files changed, 44 insertions, 6 deletions
@@ -15,8 +15,14 @@ pkgbase = ollama-cuda source = git+https://github.com/jmorganca/ollama#commit=41434a7cdcf33918ae2d37eb23d819ef7361e843 source = ggml::git+https://github.com/ggerganov/llama.cpp#commit=9e232f0234073358e7031c1b8d7aa45020469a3b source = gguf::git+https://github.com/ggerganov/llama.cpp#commit=9e70cc03229df19ca2d28ce23cc817198f897278 + source = sysusers.conf + source = tmpfiles.d + source = ollama.service b2sums = SKIP b2sums = SKIP b2sums = SKIP + b2sums = 3aabf135c4f18e1ad745ae8800db782b25b15305dfeaaa031b4501408ab7e7d01f66e8ebb5be59fc813cfbff6788d08d2e48dcf24ecc480a40ec9db8dbce9fec + b2sums = c890a741958d31375ebbd60eeeb29eff965a6e1e69f15eb17ea7d15b575a4abee176b7d407b3e1764aa7436862a764a05ad04bb9901a739ffd81968c09046bb6 + b2sums = a773bbf16cf5ccc2ee505ad77c3f9275346ddf412be283cfeaee7c2e4c41b8637a31aaff8766ed769524ebddc0c03cf924724452639b62208e578d98b9176124 pkgname = ollama-cuda @@ -18,10 +18,16 @@ _ggmlcommit=9e232f0234073358e7031c1b8d7aa45020469a3b _ggufcommit=9e70cc03229df19ca2d28ce23cc817198f897278 source=(git+$url#commit=$_ollamacommit ggml::git+https://github.com/ggerganov/llama.cpp#commit=$_ggmlcommit - gguf::git+https://github.com/ggerganov/llama.cpp#commit=$_ggufcommit) + gguf::git+https://github.com/ggerganov/llama.cpp#commit=$_ggufcommit + sysusers.conf + tmpfiles.d + ollama.service) b2sums=('SKIP' 'SKIP' - 'SKIP') + 'SKIP' + '3aabf135c4f18e1ad745ae8800db782b25b15305dfeaaa031b4501408ab7e7d01f66e8ebb5be59fc813cfbff6788d08d2e48dcf24ecc480a40ec9db8dbce9fec' + 'c890a741958d31375ebbd60eeeb29eff965a6e1e69f15eb17ea7d15b575a4abee176b7d407b3e1764aa7436862a764a05ad04bb9901a739ffd81968c09046bb6' + 'a773bbf16cf5ccc2ee505ad77c3f9275346ddf412be283cfeaee7c2e4c41b8637a31aaff8766ed769524ebddc0c03cf924724452639b62208e578d98b9176124') prepare() { cd ${pkgname/-cuda} @@ -40,8 +46,8 @@ prepare() { } build() { - export CGO_CFLAGS="$CFLAGS" CGO_CPPFLAGS="$CPPFLAGS" CGO_CXXFLAGS="$CXXFLAGS" CGO_LDFLAGS="$LDFLAGS" cd ${pkgname/-cuda} + export CGO_CFLAGS="$CFLAGS" CGO_CPPFLAGS="$CPPFLAGS" CGO_CXXFLAGS="$CXXFLAGS" CGO_LDFLAGS="$LDFLAGS" go generate ./... go build -buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external -ldflags=-buildid='' } @@ -52,7 +58,10 @@ check() { } package() { - cd ${pkgname/-cuda} - install -Dm755 ${pkgname/-cuda} "$pkgdir/usr/bin/${pkgname/-cuda}" - install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm755 ${pkgname/-cuda}/${pkgname/-cuda} "$pkgdir/usr/bin/${pkgname/-cuda}" + install -dm700 "$pkgdir/var/lib/ollama" + install -Dm644 ollama.service "$pkgdir/usr/lib/systemd/system/ollama.service" + install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/ollama.conf" + install -Dm644 tmpfiles.d "$pkgdir/usr/lib/tmpfiles.d/ollama.conf" + install -Dm644 ${pkgname/-cuda}/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/ollama.service b/ollama.service new file mode 100644 index 000000000000..b1c1637afa2a --- /dev/null +++ b/ollama.service @@ -0,0 +1,20 @@ +[Unit] +Description=Ollama Service +Wants=network-online.target +After=network.target network-online.target + +[Service] +ExecStart=/usr/bin/ollama serve +WorkingDirectory=/var/lib/ollama +Environment="HOME=/var/lib/ollama" "GIN_MODE=release" +User=ollama +Group=ollama +Restart=on-failure +RestartSec=3 +Type=simple +PrivateTmp=yes +ProtectSystem=full +ProtectHome=yes + +[Install] +WantedBy=multi-user.target diff --git a/sysusers.conf b/sysusers.conf new file mode 100644 index 000000000000..9cc5c5cd0c4a --- /dev/null +++ b/sysusers.conf @@ -0,0 +1,2 @@ +g ollama - - +u ollama - "ollama user" /var/lib/ollama diff --git a/tmpfiles.d b/tmpfiles.d new file mode 100644 index 000000000000..72b0a70d05bb --- /dev/null +++ b/tmpfiles.d @@ -0,0 +1 @@ +Q /var/lib/ollama 0750 ollama ollama |