diff --git a/Dockerfile b/Dockerfile index df92fa8b4..6cedb9ba4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -200,8 +200,7 @@ RUN --mount=type=cache,target=${UV_CACHE_DIR},id=python-cache \ && apt-get install --yes --quiet --no-install-recommends ${BUILD_PACKAGES} \ && echo "Installing Python requirements" \ && uv export --quiet --no-dev --all-extras --format requirements-txt --output-file requirements.txt \ - && UV_INDEX="https://pypi.org/simple https://download.pytorch.org/whl/cpu" UV_INDEX_STRATEGY=unsafe-best-match \ - uv pip install --system --no-python-downloads --python-preference system --requirements requirements.txt \ + && uv pip install --system --no-python-downloads --python-preference system --requirements requirements.txt \ && echo "Installing NLTK data" \ && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" snowball_data \ && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" stopwords \ diff --git a/pyproject.toml b/pyproject.toml index 02de11ff9..40800b6db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,6 @@ dependencies = [ "sentence-transformers>=4.1", "setproctitle~=1.3.4", "tika-client~=0.10.0", - "torch==2.7.0+cpu; sys_platform=='linux'", "tqdm~=4.67.1", "watchdog~=6.0", "whitenoise~=6.9", @@ -173,14 +172,8 @@ psycopg-c = [ ] tiktoken = { index = "pytorch-cpu" } tokenizers = { index = "pytorch-cpu" } -torch = [ - { index = "pytorch-cpu", marker = "sys_platform == 'linux'" }, - { index = "pypi", marker = "sys_platform != 'linux'" }, -] -torchvision = [ - { index = "pytorch-cpu", marker = "sys_platform == 'linux'" }, - { index = "pypi", marker = "sys_platform != 'linux'" }, -] +torch = { index = "pytorch-cpu" } +torchvision = { index = "pytorch-cpu" } zxing-cpp = [ { url = "https://github.com/paperless-ngx/builder/releases/download/zxing-2.3.0/zxing_cpp-2.3.0-cp312-cp312-linux_x86_64.whl", marker = "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.12'" }, { url = "https://github.com/paperless-ngx/builder/releases/download/zxing-2.3.0/zxing_cpp-2.3.0-cp312-cp312-linux_aarch64.whl", marker = "sys_platform == 'linux' and platform_machine == 'aarch64' and python_version == '3.12'" },