mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-04 18:32:51 +00:00
LibreTranslate: bump torch version (#8710)
This commit is contained in:
@@ -28,21 +28,24 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if check_for_gh_release "libretranslate" "LibreTranslate/LibreTranslate"; then
|
|
||||||
msg_info "Stopping $APP"
|
|
||||||
systemctl stop libretranslate
|
|
||||||
msg_ok "Stopped $APP"
|
|
||||||
|
|
||||||
msg_info "Updating $APP"
|
setup_uv
|
||||||
|
|
||||||
|
if check_for_gh_release "libretranslate" "LibreTranslate/LibreTranslate"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop libretranslate
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
msg_info "Updating LibreTranslate"
|
||||||
cd /opt/libretranslate
|
cd /opt/libretranslate
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
$STD pip install -U libretranslate
|
$STD pip install -U libretranslate
|
||||||
msg_ok "Updated $APP"
|
msg_ok "Updated LibreTranslate"
|
||||||
|
|
||||||
msg_info "Starting $APP"
|
msg_info "Starting Service"
|
||||||
systemctl start libretranslate
|
systemctl start libretranslate
|
||||||
msg_ok "Started $APP"
|
msg_ok "Started Service"
|
||||||
msg_ok "Update Successful"
|
msg_ok "Update Successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing dependencies"
|
msg_info "Installing dependencies"
|
||||||
$STD apt install -y --no-install-recommends \
|
$STD apt install -y \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
gcc \
|
build-essentials \
|
||||||
g++ \
|
g++ \
|
||||||
libicu-dev
|
libicu-dev
|
||||||
msg_ok "Installed dependencies"
|
msg_ok "Installed dependencies"
|
||||||
@@ -32,13 +32,18 @@ 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)"
|
||||||
|
TORCH_VERSION=$(grep -Eo '"torch ==[0-9]+\.[0-9]+\.[0-9]+' /opt/libretranslate/pyproject.toml | \
|
||||||
|
tail -n1 | sed 's/.*==//')
|
||||||
|
if [[ -z "$TORCH_VERSION" ]]; then
|
||||||
|
TORCH_VERSION="2.5.0"
|
||||||
|
fi
|
||||||
cd /opt/libretranslate
|
cd /opt/libretranslate
|
||||||
$STD uv venv .venv
|
$STD uv venv .venv
|
||||||
$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
|
||||||
$STD .venv/bin/python scripts/compile_locales.py
|
$STD .venv/bin/python scripts/compile_locales.py
|
||||||
$STD uv pip install torch==2.2.0 --extra-index-url https://download.pytorch.org/whl/cpu
|
$STD uv pip install "torch==${TORCH_VERSION}" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
$STD uv pip install "numpy<2"
|
$STD uv pip install "numpy<2"
|
||||||
$STD uv pip install .
|
$STD uv pip install .
|
||||||
$STD uv pip install libretranslate
|
$STD uv pip install libretranslate
|
||||||
|
|||||||
Reference in New Issue
Block a user