sci-ml/ollama-bin: new package, add 0.30.5

Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com>
This commit is contained in:
Adel KARA SLIMANE
2026-06-05 04:20:03 +02:00
parent dca0c52be3
commit 13238a3543
4 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST ollama-linux-amd64-rocm.tar.zst 1054915494 BLAKE2B 1fbfae73191c95dd1e4c3223508e17014f73e8ee8dbd764e1a4e37ec3aa2c52e602ef13efba7e8b346e9a5cb85b66ea52d22870593e5e145e40951bc4a8e5c1f SHA512 4892cd136f0515ce13cdc6c31176f3380f74d9268753cbed0b7b537dbb8d7f2d8a8bd809fc255e2e4d5971644c4a1e6d9873fdbdef8be7b4df4881f3bf65a45e
DIST ollama-linux-amd64.tar.zst 1394175620 BLAKE2B 6aa59356c12263630630f8e8579cf9530649fdab0f88fadeddbdb7ff568697e0fb2f1826477c4fd2958f68107099a1fd16be29ec08e092e6c02ea273fa06e454 SHA512 8e235c13ab539706b696eac32123d933621fd612c1ae9356b3391904027e7ccb305ffcf1c17c3b236ae90f4ece8fc44a1a5fdaa10701cc70393efcbed6e70f8c

View File

@@ -0,0 +1,15 @@
[Unit]
Description=Ollama Service
After=network-online.target
[Service]
ExecStart=/usr/bin/ollama serve
User=ollama
Group=ollama
# GPU access: render -> /dev/dri/renderD* + /dev/kfd (ROCm), video -> legacy/NVIDIA
SupplementaryGroups=render video
Restart=always
RestartSec=3
[Install]
WantedBy=default.target

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>adel.ks@zegrapher.com</email>
<name>Adel KARA SLIMANE</name>
</maintainer>
<use>
<flag name="rocm">Fetch standalone Ollama ROCm libraries</flag>
</use>
<upstream>
<remote-id type="github">ollama/ollama</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,52 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit unpacker systemd
DESCRIPTION="Get up and running with local large language models."
HOMEPAGE="https://ollama.com"
SRC_URI="
amd64? ( https://github.com/ollama/ollama/releases/download/v${PV}/ollama-linux-amd64.tar.zst )
rocm? ( https://github.com/ollama/ollama/releases/download/v${PV}/ollama-linux-amd64-rocm.tar.zst )
"
S="${WORKDIR}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="rocm cuda"
RESTRICT="strip"
RDEPEND="
acct-group/ollama
acct-group/render
acct-group/video
>=acct-user/ollama-3[cuda?]
cuda? (
dev-util/nvidia-cuda-toolkit
)
"
QA_PREBUILT="*"
src_prepare() {
default
if ! use cuda; then
rm -rf "${S}"/lib/ollama/{cuda_v12,cuda_v13} || die
fi
# no need to strip for rocm, because the folder containing it wouldn't even be fetched and unpacked
}
src_install(){
dodir /opt/ollama
cp -a bin lib "${ED}/opt/ollama/" || die "installing ollama blob failed"
dosym ../../opt/ollama/bin/ollama /usr/bin/ollama
dosym ../../opt/ollama/lib/ollama/llama-server /usr/bin/llama-server
dosym ../../opt/ollama/lib/ollama/llama-quantize /usr/bin/llama-quantize
systemd_dounit "${FILESDIR}/ollama.service"
}