[Docker] Fix cu12 dev image build: pin torch reinstall + JIT-fallback for missing x86 cubins (#28632)
This commit is contained in:
+8
-1
@@ -244,7 +244,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
pip list --format=freeze | awk -F'==' '/-cu13(==|$)/ {print $1}' \
|
||||
| xargs -r python3 -m pip uninstall -y && \
|
||||
python3 -m pip install --index-url https://download.pytorch.org/whl/cu${CUINDEX} \
|
||||
torch torchvision torchaudio --force-reinstall; \
|
||||
torch==2.11.0 torchvision==0.26.0 torchaudio==2.11.0 --force-reinstall; \
|
||||
python3 -m pip install https://github.com/sgl-project/whl/releases/download/v${SGL_DEEP_GEMM_VERSION}/sgl_deep_gemm-${SGL_DEEP_GEMM_VERSION}+cu129-py3-none-manylinux2014_$(uname -m).whl --force-reinstall; \
|
||||
fi \
|
||||
&& cd /sgl-workspace \
|
||||
@@ -655,6 +655,13 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
success=1 && break; \
|
||||
echo "sgl-kernel cubin download failed, retrying in 30s..." && sleep 30; \
|
||||
done; \
|
||||
# x86: if no prebuilt sgl-flash-attn3 variant matches this torch+CUDA \
|
||||
# combo (e.g. cu129 publishes no torch>=2.10 cubin), fall back to \
|
||||
# runtime JIT instead of failing the build, mirroring the aarch64 branch. \
|
||||
if [ "$success" != "1" ]; then \
|
||||
echo "WARNING: no matching sgl-flash-attn3 cubin variant for this torch+CUDA; kernels will be JIT-compiled at runtime"; \
|
||||
success=1; \
|
||||
fi; \
|
||||
fi; \
|
||||
[ "$success" = "1" ] ) \
|
||||
&& mkdir -p /root/.cache/huggingface /root/.cache/sglang \
|
||||
|
||||
Reference in New Issue
Block a user