fix(libretranslate): pin Python 3.12 for venv to ensure PyTorch compatibility (#9699)

This commit is contained in:
CanbiZ 2025-12-05 23:10:08 +01:00 committed by GitHub
parent 08cb3cc76a
commit 6409d64b93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ function update_script() {
exit exit
fi fi
setup_uv PYTHON_VERSION="3.12" setup_uv
if check_for_gh_release "libretranslate" "LibreTranslate/LibreTranslate"; then if check_for_gh_release "libretranslate" "LibreTranslate/LibreTranslate"; then
msg_info "Stopping Service" msg_info "Stopping Service"
@ -39,7 +39,7 @@ function update_script() {
msg_info "Updating LibreTranslate" msg_info "Updating LibreTranslate"
cd /opt/libretranslate cd /opt/libretranslate
source .venv/bin/activate source .venv/bin/activate
$STD pip install -U libretranslate $STD uv pip install -U libretranslate
msg_ok "Updated LibreTranslate" msg_ok "Updated LibreTranslate"
msg_info "Starting Service" msg_info "Starting Service"

View File

@ -32,7 +32,7 @@ $STD apt install -y \
python3-icu python3-icu
msg_ok "Setup Python3" msg_ok "Setup Python3"
setup_uv PYTHON_VERSION="3.12" setup_uv
fetch_and_deploy_gh_release "libretranslate" "LibreTranslate/LibreTranslate" fetch_and_deploy_gh_release "libretranslate" "LibreTranslate/LibreTranslate"
msg_info "Setup LibreTranslate (Patience)" msg_info "Setup LibreTranslate (Patience)"
@ -42,7 +42,7 @@ if [[ -z "$TORCH_VERSION" ]]; then
TORCH_VERSION="2.5.0" TORCH_VERSION="2.5.0"
fi fi
cd /opt/libretranslate cd /opt/libretranslate
$STD uv venv .venv $STD uv venv .venv --python 3.12
$STD source .venv/bin/activate $STD source .venv/bin/activate
$STD uv pip install --upgrade pip setuptools $STD uv pip install --upgrade pip setuptools
$STD uv pip install Babel==2.12.1 $STD uv pip install Babel==2.12.1