From 70d539a40671d2c88a3cba9052689e9058c7bc16 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 10 Feb 2026 13:42:18 -0500 Subject: [PATCH 1/3] Remove pytorch, stanza --- VERSION | 2 +- docker/Dockerfile | 1 - docker/arm.Dockerfile | 1 - docker/cuda.Dockerfile | 3 +-- docker/root-with-sshd.Dockerfile | 1 - docker/user-with-api-key.Dockerfile | 1 - libretranslate/app.py | 3 --- pyproject.toml | 6 +----- 8 files changed, 3 insertions(+), 15 deletions(-) diff --git a/VERSION b/VERSION index bfa363e..f8e233b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8.4 +1.9.0 diff --git a/docker/Dockerfile b/docker/Dockerfile index 2c79a0e..e263577 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,7 +15,6 @@ 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==$(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 gunicorn==23.0.0 \ && ./venv/bin/pip install . \ diff --git a/docker/arm.Dockerfile b/docker/arm.Dockerfile index 200e9a4..729ad3e 100644 --- a/docker/arm.Dockerfile +++ b/docker/arm.Dockerfile @@ -15,7 +15,6 @@ 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.0.1 --extra-index-url https://download.pytorch.org/whl/cpu \ && ./venv/bin/pip install "numpy<2" \ && ./venv/bin/pip install gunicorn==23.0.0 \ && ./venv/bin/pip install . \ diff --git a/docker/cuda.Dockerfile b/docker/cuda.Dockerfile index 830f5c3..d35b85f 100644 --- a/docker/cuda.Dockerfile +++ b/docker/cuda.Dockerfile @@ -17,8 +17,6 @@ RUN pip3 install --no-cache-dir --upgrade pip && apt-get remove python3-pip --as RUN ln -s /usr/bin/python3 /usr/bin/python -RUN pip3 install --no-cache-dir torch==1.12.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html - COPY . . RUN if [ "$with_models" = "true" ]; then \ @@ -36,6 +34,7 @@ RUN if [ "$with_models" = "true" ]; then \ RUN pip3 install Babel==2.12.1 && python3 scripts/compile_locales.py \ && pip3 install "numpy<2" \ && pip3 install . \ + && pip3 uninstall onnxruntime && pip3 install --no-cache-dir onnxruntime-gpu>=1.10.0 \ && pip3 cache purge # Depending on your cuda install you may need to uncomment this line to allow the container to access the cuda libraries diff --git a/docker/root-with-sshd.Dockerfile b/docker/root-with-sshd.Dockerfile index 1d95380..58bad77 100644 --- a/docker/root-with-sshd.Dockerfile +++ b/docker/root-with-sshd.Dockerfile @@ -20,7 +20,6 @@ COPY . . RUN <=2.5.0;python_version>='3.12'", ] [project.scripts] From a337629ce8f1f3b4262f561465e3c462d1983f03 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 10 Feb 2026 13:46:33 -0500 Subject: [PATCH 2/3] Allow direct references --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index ab59aac..e38715a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,6 +85,9 @@ History = "https://github.com/LibreTranslate/LibreTranslate/releases" [tool.hatch.build] artifacts = ["*.mo"] +[tool.hatch.metadata] +allow-direct-references = true + # ENVIRONMENTS AND SCRIPTS [tool.hatch.envs.default] features = [ From 26eae6bf75b8cdb59a088fa7f6813232c6587866 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Tue, 10 Feb 2026 13:51:35 -0500 Subject: [PATCH 3/3] Don't require git --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e38715a..eb8270f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ classifiers = [ dynamic = ["version"] dependencies = [ - "argostranslate @ git+https://github.com/LibreTranslate/argos-translate@v1.12.0", + "argostranslate @ https://github.com/LibreTranslate/argos-translate/archive/refs/tags/v1.12.0.zip", "Flask ==2.2.5", "flask-swagger ==0.2.14", "flask-swagger-ui ==4.11.1",