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

Merge pull request #869 from 72f393f4a1b9dfecdd32641633e9e896/patch-1

Update torch installation in Dockerfile to use version from pyproject.toml
This commit is contained in:
Piero Toffanin
2025-10-21 12:51:55 -04:00
committed by GitHub

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