mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-14 21:54:22 -06:00
amd64-specific requirements handling
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -200,7 +200,16 @@ RUN set -eux \
|
||||
'--extra-index-url https://download.pytorch.org/whl/cpu' \
|
||||
'torch==2.7.0' \
|
||||
> /tmp/torch-cpu-constraints.txt \
|
||||
&& uv export --quiet --no-dev --all-extras --format requirements-txt --output-file requirements.txt \
|
||||
&& if [ "${TARGETARCH}" = "amd64" ]; then \
|
||||
uv export --quiet --no-dev --all-extras --no-hashes --format requirements-txt --output-file requirements.txt ; \
|
||||
else \
|
||||
uv export --quiet --no-dev --all-extras --format requirements-txt --output-file requirements.txt ; \
|
||||
fi \
|
||||
&& if [ "${TARGETARCH}" = "amd64" ]; then \
|
||||
# Drop CUDA/NVIDIA-only packages that are pulled in by the CUDA PyTorch wheels on amd64.
|
||||
# We'll force a CPU-only torch wheel via constraints during install, so these are unnecessary.
|
||||
sed -i -E '/^(nvidia-|triton==|cusparselt==)/d' requirements.txt ; \
|
||||
fi \
|
||||
&& if [ "${TARGETARCH}" = "amd64" ]; then \
|
||||
uv pip install --no-cache --system --no-python-downloads --python-preference system \
|
||||
--index-strategy unsafe-best-match \
|
||||
|
||||
Reference in New Issue
Block a user