From b7fddf00698b5b22fa4915dca557406ef935c73e Mon Sep 17 00:00:00 2001 From: cclohmar Date: Sat, 30 May 2026 16:06:03 +0000 Subject: [PATCH] fix: set OLLAMA_HOST explicitly for model pull - ollama pull failed because the CLI didn't know where the server was - Uses OLLAMA_HOST=http://127.0.0.1:11434 to connect regardless of user --- install.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 424b8cb..38c368b 100755 --- a/install.sh +++ b/install.sh @@ -199,12 +199,9 @@ case "$AI_CHOICE" in sleep 2 done info "Pulling model $AI_MODEL (this may take a while)..." - # Pull as the ollama user so models are in the right place - if id -u ollama &>/dev/null; then - sudo -u ollama ollama pull "$AI_MODEL" 2>&1 | tail -3 - else - ollama pull "$AI_MODEL" 2>&1 | tail -3 - fi + # Pull explicitly via the API URL so it works regardless of which user + # runs the command (the Ollama service listens on 127.0.0.1:11434) + sudo_if sh -c "OLLAMA_HOST=http://127.0.0.1:11434 ollama pull $AI_MODEL" 2>&1 | tail -3 AI_BASE_URL="http://localhost:11434" ;; *)