Skip to content

Commit 2589917

Browse files
authored
build: Install NVIDIA packages based on CUDA version (#5461) (#5472)
Signed-off-by: pvijayakrish <pvijayakrish@nvidia.com> Signed-off-by: Pavithra Vijayakrishnan <160681768+pvijayakrish@users.noreply.github.com>
1 parent 115531a commit 2589917

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

container/Dockerfile.sglang

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ RUN --mount=type=bind,source=.,target=/mnt/local_src \
509509
pip install --no-cache-dir --break-system-packages "urllib3>=2.6.3" && \
510510
# pip/uv bypasses umask when creating .egg-info files, but chmod -R is fast here (small directory)
511511
chmod -R g+w /workspace/benchmarks && \
512+
# Install NVIDIA packages based on CUDA version
512513
CUDA_MAJOR=$(nvcc --version | egrep -o 'cuda_[0-9]+' | cut -d_ -f2) && \
513514
if [ "$CUDA_MAJOR" = "12" ]; then \
514515
# Install NVIDIA packages that are needed for DeepEP to work properly
@@ -517,6 +518,13 @@ RUN --mount=type=bind,source=.,target=/mnt/local_src \
517518
nvidia-nccl-cu12==2.28.3 \
518519
nvidia-cudnn-cu12==9.16.0.29 \
519520
nvidia-cutlass-dsl==4.3.0; \
521+
elif [ "$CUDA_MAJOR" = "13" ]; then \
522+
# CUDA 13: Install CuDNN for PyTorch 2.9.1 compatibility
523+
pip install --no-cache-dir --break-system-packages --force-reinstall --no-deps \
524+
nvidia-nccl-cu13==2.28.3 \
525+
nvidia-cublas==13.1.0.3 \
526+
nvidia-cutlass-dsl==4.3.1 \
527+
nvidia-cudnn-cu13==9.16.0.29; \
520528
fi
521529

522530
# Switch back to dynamo user after package installations

0 commit comments

Comments
 (0)