1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2025-10-30 23:37:48 +02:00

Update torch installation to use version from pyproject.toml

This commit is contained in:
9d0eb63c50aabda243495e0e453a344c
2025-10-21 00:33:56 -07:00
committed by GitHub
parent 4d109e18ed
commit 25287bf1fa

View File

@@ -15,7 +15,7 @@ COPY . .
# Install package from source code, compile translations
RUN ./venv/bin/pip install Babel==2.12.1 && ./venv/bin/python scripts/compile_locales.py \
&& ./venv/bin/pip install torch==2.2.0 --extra-index-url https://download.pytorch.org/whl/cpu \
&& ./venv/bin/pip install torch==$(grep -o -m1 'torch.*;' pyproject.toml|sed 's/[^0-9.]//g') --extra-index-url https://download.pytorch.org/whl/cpu \
&& ./venv/bin/pip install "numpy<2" \
&& ./venv/bin/pip install . \
&& ./venv/bin/pip cache purge