summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlexander F. Rødseth2024-01-14 13:19:08 +0100
committerAlexander F. Rødseth2024-01-14 13:19:08 +0100
commit7e970213e3a3cf6485c04f3b3c54483f53daf1f5 (patch)
treea4c6625a9b0b3748d576a0f48d905a7236db7652 /PKGBUILD
parent9bf5196b07fc20e85ec8fdd1d1ad5af32b45df2b (diff)
downloadaur-7e970213e3a3cf6485c04f3b3c54483f53daf1f5.tar.gz
upgpkg: 0.1.20-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 16 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 187aaa6c712b..86aab71e5724 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,26 +3,27 @@
pkgname=ollama-cuda
pkgdesc='Create, run and share large language models (LLMs) with CUDA'
-pkgver=0.1.18
-pkgrel=2
+pkgver=0.1.20
+pkgrel=1
arch=(x86_64)
url='https://github.com/jmorganca/ollama'
license=(MIT)
-# The git submodule commit hashes are here:
-# https://github.com/jmorganca/ollama/tree/v$pkgver
-_llamacppcommit=328b83de23b33240e28f4e74900d1d06726f5eb1
+_ollamacommit=ab6be852c77064d7abeffb0b03c096aab90e95fe # tag: v0.1.20
+# The llama.cpp git submodule commit hash can be found here:
+# https://github.com/jmorganca/ollama/tree/v0.1.20/llm
+_llama_cpp_commit=328b83de23b33240e28f4e74900d1d06726f5eb1
makedepends=(cmake cuda git go)
provides=(ollama)
conflicts=(ollama)
-source=(git+$url#tag=v$pkgver
- llamacpp::git+https://github.com/ggerganov/llama.cpp#commit=$_llamacppcommit
+source=(git+$url#commit=$_ollamacommit
+ llama.cpp::git+https://github.com/ggerganov/llama.cpp#commit=$_llama_cpp_commit
sysusers.conf
tmpfiles.d
ollama.service)
b2sums=('SKIP'
'SKIP'
'3aabf135c4f18e1ad745ae8800db782b25b15305dfeaaa031b4501408ab7e7d01f66e8ebb5be59fc813cfbff6788d08d2e48dcf24ecc480a40ec9db8dbce9fec'
- 'c890a741958d31375ebbd60eeeb29eff965a6e1e69f15eb17ea7d15b575a4abee176b7d407b3e1764aa7436862a764a05ad04bb9901a739ffd81968c09046bb6'
+ 'e8f2b19e2474f30a4f984b45787950012668bf0acb5ad1ebb25cd9776925ab4a6aa927f8131ed53e35b1c71b32c504c700fe5b5145ecd25c7a8284373bb951ed'
'a773bbf16cf5ccc2ee505ad77c3f9275346ddf412be283cfeaee7c2e4c41b8637a31aaff8766ed769524ebddc0c03cf924724452639b62208e578d98b9176124')
prepare() {
@@ -31,25 +32,24 @@ prepare() {
rm -frv llm/llama.cpp
# Copy git submodule files instead of symlinking because the build process is sensitive to symlinks.
- cp -r "$srcdir/llamacpp" llm/llama.cpp
+ cp -r "$srcdir/llama.cpp" llm/llama.cpp
- # Do not git clone when "go generate" is being run.
- sed -i 's,git submodule,true,g' llm/generate/gen_common.sh
-
- # Set build mode to release
- sed -i '33s/DebugMode/ReleaseMode/;45s/DebugMode/ReleaseMode/' "$srcdir/ollama/server/routes.go"
+ # Turn LTO on and set the build type to Release
+ sed -i 's,T_CODE=on,T_CODE=on -D LLAMA_LTO=on -D CMAKE_BUILD_TYPE=Release,g' llm/generate/gen_linux.sh
}
build() {
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=''
+ go build -buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external \
+ -ldflags=-buildid='' -ldflags="-X=github.com/jmorganca/ollama/version.Version=$pkgver"
}
check() {
cd ${pkgname/-cuda}
- go test ./...
+ go test ./api ./format
+ ./ollama --version > /dev/null
}
package() {