From eecb57c7b4aaec20ca08bf728ba9af2e8d115c7b Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Thu, 26 Nov 2026 11:31:14 +0100 Subject: [PATCH] LibreChat: rebuild the RAG API venv on update, keep uploads The clean install of rag-api removed .venv, and the update called .venv/bin/pip, so every rag-api update failed with exit 127 and left the service stopped; the pending marker repeated it on each run. The update now creates the venv like the install does, and keeps uploads/, the RAG_UPLOAD_DIR. LibreChat's clean install likewise keeps librechat.yaml, uploads/, client/public/images and api/logs instead of deleting them. Fixes #19042 --- ct/librechat.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ct/librechat.sh b/ct/librechat.sh index 07517546a..580568293 100644 --- a/ct/librechat.sh +++ b/ct/librechat.sh @@ -40,7 +40,7 @@ function update_script() { create_backup /opt/librechat/.env - CLEAN_INSTALL=1 fetch_and_deploy_gh_tag "librechat" "danny-avila/LibreChat" + CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="librechat.yaml uploads client/public/images api/logs" fetch_and_deploy_gh_tag "librechat" "danny-avila/LibreChat" restore_backup @@ -68,13 +68,17 @@ function update_script() { create_backup /opt/rag-api/.env - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "rag-api" "danny-avila/rag_api" "tarball" + CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="uploads" fetch_and_deploy_gh_release "rag-api" "danny-avila/rag_api" "tarball" restore_backup + PYTHON_VERSION="3.12" setup_uv + msg_info "Updating RAG API Dependencies" cd /opt/rag-api + $STD uv venv --python 3.12 --seed .venv $STD .venv/bin/pip install -r requirements.lite.txt + mkdir -p /opt/rag-api/uploads msg_ok "Updated RAG API Dependencies" msg_info "Starting RAG API"