mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 11:04:10 -04:00
dev-ml/ollama: fixes from from https://github.com/gentoo/guru/pull/210/files
Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
This commit is contained in:
@@ -3,15 +3,12 @@
|
||||
description="Ollama Service"
|
||||
command="/usr/bin/ollama"
|
||||
command_args="serve"
|
||||
command_user="root"
|
||||
command_group="users"
|
||||
command_user="ollama"
|
||||
command_group="ollama"
|
||||
command_background="yes"
|
||||
pidfile="/run/ollama.pid"
|
||||
log="/var/log/ollama.log"
|
||||
|
||||
# Environment variable pointing to models location
|
||||
export OLLAMA_MODELS="/usr/share/ollama/models"
|
||||
|
||||
# Ollama allows cross-origin requests from 127.0.0.1 and 0.0.0.0 by default.
|
||||
# Additional origins can be configured with OLLAMA_ORIGINS.
|
||||
# export OLLAMA_ORIGINS="<ip>"
|
||||
|
||||
@@ -24,7 +24,15 @@ BDEPEND="
|
||||
)
|
||||
"
|
||||
|
||||
DEPEND="${BDEPEND}"
|
||||
RDEPEND="
|
||||
acct-group/ollama
|
||||
acct-user/ollama
|
||||
"
|
||||
|
||||
IDEPEND="
|
||||
acct-group/ollama
|
||||
acct-user/ollama
|
||||
"
|
||||
|
||||
pkg_pretend() {
|
||||
if use amd; then
|
||||
@@ -53,6 +61,9 @@ src_compile() {
|
||||
}
|
||||
|
||||
src_install() {
|
||||
touch /var/log/ollama.log || die
|
||||
fowners ollama:ollama /var/log/ollama.log
|
||||
|
||||
dobin ollama
|
||||
doinitd "${FILESDIR}"/ollama
|
||||
fperms 0755 /etc/init.d/ollama
|
||||
|
||||
Reference in New Issue
Block a user