cp: build: Fix ngc pytorch build with deep-ep (1234) into r0.4.0 - #1299
Conversation
Signed-off-by: Charlie Truong <chtruong@nvidia.com> Signed-off-by: NeMo Bot <nemo-bot@nvidia.com>
ð WalkthroughWalkthroughUpdates the NGC PyTorch Dockerfile: sets TORCH_CUDA_ARCH_LIST to "9.0 10.0" in the hermetic build stage and modifies the build RUN steps to ensure nvshmem is installed before building DeepEP, followed by an additional uv sync with expanded extra groups and flags. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant Docker as Docker Build
participant Herm as Hermetic Stage
participant UV as uv
participant NVSH as nvshmem
participant DeepEP as DeepEP Build
Dev->>Docker: build
Docker->>Herm: start build stage
Note over Herm: ENV TORCH_CUDA_ARCH_LIST="9.0 10.0"
Herm->>UV: uv sync (ensure nvshmem)
UV->>NVSH: install/verify nvshmem
NVSH-->>UV: ready
Herm->>DeepEP: build DeepEP
DeepEP-->>Herm: built
Herm->>UV: uv sync --extra vllm,mcore,automodel,all-groups ...<br/>--no-install-project
UV-->>Herm: dependencies synced
Herm-->>Docker: stage complete
Estimated code review effortðŊ 2 (Simple) | âąïļ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touchesâ Failed checks (1 warning)
â Passed checks (3 passed)
âĻ Finishing touchesð§Š Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
ð§đ Nitpick comments (1)
docker/Dockerfile.ngc_pytorch (1)
100-103: Avoid installing all extras; add an explicit NVSHMEM presence check before DeepEP buildInstalling with --all-groups can pull dev/test extras, inflating image size and build time. Also, the comment implies nvshmem must pre-exist; make that explicit with a fast failure check.
- Keep extras minimal (only whatâs required to build/use DeepEP).
- Verify where nvshmem actually comes from (system vs pip meta). If itâs a system lib, add a preflight check.
Apply:
-# Ensure nvshmem is installed before building DeepEP -uv sync --link-mode symlink --locked --inexact --no-install-project $UV_NO_INSTALL_PACKAGES -uv sync --link-mode symlink --locked --inexact --extra vllm --extra mcore --extra automodel --all-groups --no-install-project $UV_NO_INSTALL_PACKAGES +# Ensure NVSHMEM runtime is present before building DeepEP (fail fast if missing) +ldconfig -p | grep -q nvshmem || { echo "ERROR: NVSHMEM runtime not found on system path"; exit 1; } +# Prime base deps without installing the project to keep layer size lower +uv sync --link-mode symlink --locked --inexact --no-install-project $UV_NO_INSTALL_PACKAGES +# Install only the extras needed (avoid --all-groups to prevent dev/test bloat) +uv sync --link-mode symlink --locked --inexact \ + --extra vllm --extra mcore --extra automodel \ + --no-install-project $UV_NO_INSTALL_PACKAGESIf DeepEP requires an additional extra (e.g., --extra deep_ep), prefer adding that explicitly over --all-groups. Please confirm which extra actually triggers DeepEPâs build in pyproject.
ð Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
ð Files selected for processing (1)
docker/Dockerfile.ngc_pytorch(2 hunks)
â° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Lint check
- GitHub Check: Lint check
- GitHub Check: Lint check
- GitHub Check: Post submodule check comment / Comment on PR
- GitHub Check: Post automodel integration comment / Comment on PR
ð Additional comments (1)
docker/Dockerfile.ngc_pytorch (1)
86-87: Use semicolon-separated TORCH_CUDA_ARCH_LIST with +PTX; verify sm_100 supportReplace:
- ENV TORCH_CUDA_ARCH_LIST="9.0 10.0" + ENV TORCH_CUDA_ARCH_LIST="9.0;10.0+PTX"Confirm that
nvcr.io/nvidia/pytorch:25.06-py3âs toolchain supports sm_100; gate or remove it if unsupported.
beep boop [ðĪ]: Hi @chtruong814 ð,
Summary by CodeRabbit