From abe19a2df41cb7b3a0880c6a99fdef0b9d93755c Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Mon, 31 Aug 2026 15:41:25 +0200 Subject: [PATCH] openwebui: add UV_HTTP_TIMEOUT and retry loop to prevent uv install hangs --- ct/openwebui.sh | 12 ++++++++++-- install/openwebui-install.sh | 6 +++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ct/openwebui.sh b/ct/openwebui.sh index a418024aa..e89b242ae 100644 --- a/ct/openwebui.sh +++ b/ct/openwebui.sh @@ -50,7 +50,11 @@ function update_script() { msg_info "Installing uv-based Open-WebUI" PYTHON_VERSION="3.12" setup_uv - $STD uv tool install --python 3.12 --constraint <(echo "numba>=0.60") open-webui[all] + export UV_HTTP_TIMEOUT=300 + for attempt in $(seq 1 3); do + $STD uv tool install --python 3.12 --constraint <(echo "numba>=0.60") open-webui[all] && break + [[ $attempt -lt 3 ]] && msg_warn "Open WebUI install attempt $attempt failed, retrying..." && sleep 10 + done msg_ok "Installed uv-based Open-WebUI" msg_info "Restoring data" @@ -123,7 +127,11 @@ EOF OTEL_ARGS+=(--with "$pkg") done < <(uv pip list --python "$OWUI_PYTHON" --format freeze 2>/dev/null | grep -i '^opentelemetry-' | cut -d= -f1) fi - $STD uv tool install --force --python 3.12 --constraint <(echo "numba>=0.60") "${OTEL_ARGS[@]}" open-webui[all] + export UV_HTTP_TIMEOUT=300 + for attempt in $(seq 1 3); do + $STD uv tool install --force --python 3.12 --constraint <(echo "numba>=0.60") "${OTEL_ARGS[@]}" open-webui[all] && break + [[ $attempt -lt 3 ]] && msg_warn "Open WebUI update attempt $attempt failed, retrying..." && sleep 10 + done systemctl restart open-webui msg_ok "Updated Open WebUI" msg_ok "Updated successfully!" diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 00a24dc5a..13234820d 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -46,7 +46,11 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then fi msg_info "Installing Open WebUI" -$STD uv tool install --python 3.12 --constraint <(echo "numba>=0.60") "${OTEL_ARGS[@]}" open-webui[all] +export UV_HTTP_TIMEOUT=300 +for attempt in $(seq 1 3); do + $STD uv tool install --python 3.12 --constraint <(echo "numba>=0.60") "${OTEL_ARGS[@]}" open-webui[all] && break + [[ $attempt -lt 3 ]] && msg_warn "Open WebUI install attempt $attempt failed, retrying..." && sleep 10 +done msg_ok "Installed Open WebUI" read -r -p "${TAB3}Would you like to add Ollama? " prompt