From 668c146fd078880441f3b06566856885d3ed4925 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 14 Jan 2026 00:08:35 -0800 Subject: [PATCH] amd64-specific requirements handling --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 36b321056..3d399e25a 100644 --- a/Dockerfile +++ b/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 \