feat: add support from building images using vllm from private repos#1605
feat: add support from building images using vllm from private repos#1605
Conversation
📝 WalkthroughWalkthroughThis PR enables SSH agent forwarding in Docker builds to support cloning private vLLM repositories. Changes include adding the Changes
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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docker/Dockerfile(1 hunks)docs/guides/use-custom-vllm.md(1 hunks)tools/build-custom-vllm.sh(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.sh
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.sh: Use uv run instead of python to execute scripts
Follow the Google Shell Style Guide for shell scripts
Files:
tools/build-custom-vllm.sh
!(**/tests/**|**/test_*.py|**/test_*.sh)
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Add the NVIDIA copyright header to all Python files and shell scripts (excluding tests). The header should include the current year
Files:
tools/build-custom-vllm.shdocs/guides/use-custom-vllm.mddocker/Dockerfile
**/*.{py,sh}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
The NVIDIA copyright header should appear at the top of all Python files and shell scripts (excluding tests)
Files:
tools/build-custom-vllm.sh
docs/**/*.md
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Update docs/index.md when a new markdown doc is added under docs/**/*.md or a markdown file is renamed, ensuring the document appears in the most appropriate section
Files:
docs/guides/use-custom-vllm.md
🧠 Learnings (1)
📚 Learning: 2025-11-24T17:24:41.976Z
Learnt from: CR
Repo: NVIDIA-NeMo/RL PR: 0
File: CODING_GUIDELINES.md:0-0
Timestamp: 2025-11-24T17:24:41.976Z
Learning: Applies to Dockerfile.ngc_pytorch : Exception: Dockerfile.ngc_pytorch is exempt from the uv run rule
Applied to files:
docker/Dockerfile
🪛 markdownlint-cli2 (0.18.1)
docs/guides/use-custom-vllm.md
92-92: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
102-102: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
121-121: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
⏰ 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). (6)
- GitHub Check: build-container / main
- GitHub Check: sphinx-build / Build docs
- 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 (5)
tools/build-custom-vllm.sh (2)
44-46: SSH command configuration looks solid.The use of
GIT_SSH_COMMANDto disable host key verification is appropriate for transient Docker build environments with mounted SSH keys. The explanatory comments make the trade-off clear, and the scoping of the environment variable to just the clone operation is correct.
1-160: Excellent implementation of the build-custom-vllm.sh script.The script properly handles SSH authentication, maintains strict error handling, uses uv run correctly, and safely manipulates the pyproject.toml via tomlkit. The output messages guide the user through next steps, and the environment export at the end (lines 157-160) provides clear integration points for Docker builds.
docker/Dockerfile (1)
88-106: SSH mount addition is correct but requires buildx documentation.The
--mount=type=sshflag is valid Docker buildx syntax and integrates well with the existing RUN block. However, this feature requires a recent version of Docker buildx that supports SSH mounts. For users with older tooling or standarddocker build, the build may fail without clear guidance.Please verify or document:
- Minimum Docker/buildx version required for SSH mount support
- Whether there's a graceful fallback or error message for unsupported versions
- Whether documentation or build logs clarify that
--ssh defaultmust be passed todocker buildx build(as shown in the markdown guide)You may want to add an inline comment in the Dockerfile documenting the buildx requirement, or ensure the error message from Docker is sufficient.
docs/guides/use-custom-vllm.md (2)
135-156: Clear explanation of container deployment patterns.The section on running applications with custom vLLM containers (lines 135-156) provides strong justification for why frozen environments (bare
python) are preferred overuv runorNRL_FORCE_REBUILD_VENVS=true. The explanation of the chicken-and-egg problem with vLLM compilation is helpful and the cross-reference to the dependency-management documentation is appropriate.
1-156: No action needed—docs/index.mdhas already been updated with a reference toguides/use-custom-vllm.md.Likely an incorrect or invalid review comment.
Signed-off-by: Terry Kong <terryk@nvidia.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Signed-off-by: Terry Kong <terryk@nvidia.com>
This reverts commit 9a91940. Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Signed-off-by: Terry Kong <terryk@nvidia.com>
Signed-off-by: Terry Kong <terryk@nvidia.com>
0e219c4 to
7ae4f50
Compare
…VIDIA-NeMo#1605) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…VIDIA-NeMo#1605) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Parth Mannan <pmannan@nvidia.com>
…VIDIA-NeMo#1605) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: yuanhangs <yuanhangs@nvidia.com>
…VIDIA-NeMo#1605) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: yuanhangs <yuanhangs@nvidia.com>
…1605) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…1605) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…1605) Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: Terry Kong <terrycurtiskong@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.