From f0b1afca69019f8eef66a2d121bd646d8361fe4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 20 May 2026 07:34:03 +0200 Subject: [PATCH] Ollama: Fix for latest version (#14596) * fix * oops * Also in openwebui * removed unused .ollama file --- ct/ollama.sh | 7 +++++-- ct/openwebui.sh | 5 +++-- install/ollama-install.sh | 2 +- install/openwebui-install.sh | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ct/ollama.sh b/ct/ollama.sh index ebd2092f6..2c5ab3701 100644 --- a/ct/ollama.sh +++ b/ct/ollama.sh @@ -27,7 +27,10 @@ function update_script() { msg_error "No Ollama Installation Found!" exit fi - if check_for_gh_release "ollama" "ollama/ollama"; then + + [[ -f /root/.ollama ]] && rm -f /root/.ollama + + if check_for_gh_release "ollama-com" "ollama/ollama"; then ensure_dependencies zstd msg_info "Stopping Services" systemctl stop ollama @@ -36,7 +39,7 @@ function update_script() { OLLAMA_INSTALL_DIR="/usr/local/lib/ollama" rm -rf "$OLLAMA_INSTALL_DIR" /usr/local/bin/ollama mkdir -p "$OLLAMA_INSTALL_DIR" - if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then + if ! fetch_and_deploy_gh_release "ollama-com" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then msg_error "Download or deployment failed – check network connectivity and GitHub API availability" exit 250 fi diff --git a/ct/openwebui.sh b/ct/openwebui.sh index 9276f2262..5c7cde766 100644 --- a/ct/openwebui.sh +++ b/ct/openwebui.sh @@ -26,6 +26,7 @@ function update_script() { check_container_resources ensure_dependencies zstd build-essential libmariadb-dev + [[ -f /root/.ollama ]] && rm -f /root/.ollama if [[ -d /opt/open-webui ]]; then msg_warn "Legacy installation detected — migrating to uv based install..." @@ -91,13 +92,13 @@ EOF if [ -x "/usr/bin/ollama" ]; then msg_info "Checking for Ollama Update" - if check_for_gh_release "ollama" "ollama/ollama"; then + if check_for_gh_release "ollama-com" "ollama/ollama"; then msg_info "Stopping Ollama Service" systemctl stop ollama msg_ok "Stopped Service" rm -rf /usr/lib/ollama /usr/bin/ollama - if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then + if ! fetch_and_deploy_gh_release "ollama-com" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then msg_error "Ollama download or deployment failed – check network connectivity and GitHub API availability" else ln -sf /usr/lib/ollama/bin/ollama /usr/bin/ollama diff --git a/install/ollama-install.sh b/install/ollama-install.sh index 3f0284e85..df8fc82cc 100644 --- a/install/ollama-install.sh +++ b/install/ollama-install.sh @@ -65,7 +65,7 @@ msg_info "Installing Ollama (Patience)" OLLAMA_INSTALL_DIR="/usr/local/lib/ollama" BINDIR="/usr/local/bin" mkdir -p "$OLLAMA_INSTALL_DIR" -if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then +if ! fetch_and_deploy_gh_release "ollama-com" "ollama/ollama" "prebuild" "latest" "$OLLAMA_INSTALL_DIR" "ollama-linux-amd64.tar.zst"; then msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability" exit 250 fi diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 02369e80d..874cd1211 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -73,7 +73,7 @@ EOF msg_ok "Installed Intel® oneAPI Base Toolkit" msg_info "Installing Ollama" - if ! fetch_and_deploy_gh_release "ollama" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then + if ! fetch_and_deploy_gh_release "ollama-com" "ollama/ollama" "prebuild" "latest" "/usr/lib/ollama" "ollama-linux-amd64.tar.zst"; then msg_error "Failed to download or deploy Ollama – check network connectivity and GitHub API availability" else ln -sf /usr/lib/ollama/bin/ollama /usr/bin/ollama