Skip to content

Conversation

@nv-tusharma
Copy link
Contributor

@nv-tusharma nv-tusharma commented Aug 5, 2025

Overview:

Cherry-pick from release/0.4.0 to main: #2298

We are encountering the following issue in CI and during local validation runs with the sglang runtime container:

2025-08-04T22:37:58.555820Z 01O [BASH] /bin/sh: 1: /usr/local/cuda/bin/nvcc: not found
This indicates that the cuda runtime container is missing the nvcc compiler which is a required dependency for sglang to built JIT kernels on the fly. This PR copies over cuda libraries from devel to runtime to ensure that the cuda binaries are the same across both containers. With this change, the CI tests should pass.

Details:

  • Copy cuda libraries from devel to runtime stage in sglang container

Where should the reviewer start?

  • Dockerfile.sglang

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • Chores
    • Updated the runtime image to include the complete CUDA development toolkit for improved compatibility.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 5, 2025

Walkthrough

The Dockerfile for the runtime image was updated to copy the entire CUDA development toolkit directory from the base development image into the runtime image. This change ensures the CUDA toolkit is present in the runtime environment, with no other modifications to dependencies, environment variables, or build steps.

Changes

Cohort / File(s) Change Summary
Dockerfile CUDA Toolkit Copy
container/Dockerfile.sglang
Added a command to copy the /usr/local/cuda/ directory from the base development image to the runtime image. No other changes made.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

In Docker’s den, a toolkit hops,
CUDA now joins runtime’s shops.
A copy here, a copy there—
GPUs rejoice, they’re fully aware!
With every build, the bunnies cheer,
More power in the container sphere!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b48d4c3 and 37a3b49.

📒 Files selected for processing (1)
  • container/Dockerfile.sglang (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: grahamking
PR: ai-dynamo/dynamo#1177
File: container/Dockerfile.vllm:102-105
Timestamp: 2025-05-28T22:54:46.875Z
Learning: In Dockerfiles, when appending to environment variables that may not exist in the base image, Docker validation will fail if you reference undefined variables with ${VARIABLE} syntax. In such cases, setting the environment variable directly (e.g., ENV CPATH=/usr/include) rather than appending is the appropriate approach.
📚 Learning: in dockerfiles, when appending to environment variables that may not exist in the base image, docker...
Learnt from: grahamking
PR: ai-dynamo/dynamo#1177
File: container/Dockerfile.vllm:102-105
Timestamp: 2025-05-28T22:54:46.875Z
Learning: In Dockerfiles, when appending to environment variables that may not exist in the base image, Docker validation will fail if you reference undefined variables with ${VARIABLE} syntax. In such cases, setting the environment variable directly (e.g., ENV CPATH=/usr/include) rather than appending is the appropriate approach.

Applied to files:

  • container/Dockerfile.sglang
📚 Learning: the fault tolerance tests in tests/fault_tolerance/ are designed to run only in the mounted containe...
Learnt from: nnshah1
PR: ai-dynamo/dynamo#1444
File: tests/fault_tolerance/scenarios.py:57-57
Timestamp: 2025-07-01T15:39:56.789Z
Learning: The fault tolerance tests in tests/fault_tolerance/ are designed to run only in the mounted container environment, so hardcoded absolute paths with `/workspace/` prefix are intentional and should not be changed to relative paths.

Applied to files:

  • container/Dockerfile.sglang
⏰ 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). (1)
  • GitHub Check: Build and Test - vllm

@nv-tusharma
Copy link
Contributor Author

/ok to test 37a3b49

Copy link
Contributor

@pvijayakrish pvijayakrish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@nv-tusharma
Copy link
Contributor Author

/ok to test bd03999

@nv-tusharma nv-tusharma merged commit 77b53c4 into main Aug 8, 2025
9 of 10 checks passed
@nv-tusharma nv-tusharma deleted the tusharma/add-cuda-libs-sglang branch August 8, 2025 17:27
mkhazraee pushed a commit to whoisj/dynamo that referenced this pull request Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants