Skip to content

Conversation

@karya0
Copy link
Contributor

@karya0 karya0 commented Jul 29, 2025

Overview:

The runtime container image for VLLM is missing packages related to ibverbs, etc., which are essential for UCX to discover underlying RDMA devices. Further, curl is rather helpful in communicating with the dynamo endpoint and polling other service and their health endpoints.

The impact on container size is relatively negligible (~28 MB).

Details:

Where should the reviewer start?

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

  • closes GitHub issue: #xxx

Summary by CodeRabbit

  • Chores
    • Enhanced the runtime environment by adding support for network and RDMA devices, and included curl for improved endpoint polling capabilities.

@github-actions
Copy link

👋 Hi karya0! Thank you for contributing to ai-dynamo/dynamo.

Just a reminder: The NVIDIA Test Github Validation CI runs an essential subset of the testing framework to quickly catch errors.Your PR reviewers may elect to test the changes comprehensively before approving your changes.

🚀

@github-actions github-actions bot added fix external-contribution Pull request is from an external contributor labels Jul 29, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

Walkthrough

The Dockerfile for the runtime image was updated to install additional packages, including curl and several UCX and RDMA-related libraries. These changes enhance the image by ensuring it contains required dependencies for network and RDMA device support.

Changes

Cohort / File(s) Change Summary
Dockerfile Dependency Additions
container/Dockerfile.vllm
Added curl, UCX, and RDMA-related libraries to the apt-get install command in the runtime image setup.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

In the Docker burrow, new tools hop in,
Curl and RDMA, let the networking begin!
With verbs and utilities, connections now gleam,
The image is ready—fast as a dream.
🐰✨

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.
    • @coderabbitai modularize this function.
  • 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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: 0

🧹 Nitpick comments (2)
container/Dockerfile.vllm (2)

440-441: Pin or document the curl version to avoid future breakage

curl is often backward-compatible, yet sporadic regressions (e.g., HTTP/2 or TLS quirks) do happen between minor releases. Consider either:

  1. Pinning to the current known-good version (e.g. curl=8.5.0-1) or
  2. Adding a comment that runtime compatibility is manually verified on every base-image update.

That keeps the container deterministic and shields CI from upstream repo surprises.


442-444: Dev headers unnecessarily inflate the runtime image

libibverbs-dev, libibumad-dev, librdmacm-dev, libnuma-dev ship headers and static libs that are only needed at build time.
The runtime layer merely needs the shared libraries, which live in the non--dev packages (libibverbs1, libibumad3, librdmacm1, libnuma1).
Dropping the -dev variants trims several MB and speeds up security-scans without impacting UCX at runtime.

Example adjustment:

-        libibverbs-dev rdma-core ibverbs-utils libibumad-dev \
-        libnuma-dev librdmacm-dev ibverbs-providers \
+        libibverbs1  rdma-core ibverbs-utils libibumad3 \
+        libnuma1    librdmacm1  ibverbs-providers \

If headers are genuinely required (e.g., for on-device JIT of UCX plugins), clarify that in a comment to avoid accidental removal later.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3175b10 and 59cf0c9.

📒 Files selected for processing (1)
  • container/Dockerfile.vllm (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
container/Dockerfile.vllm (1)

Learnt from: grahamking
PR: #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.

@alec-flowers
Copy link
Contributor

Maybe can add vim too? Found myself installing it a few times.

@karya0
Copy link
Contributor Author

karya0 commented Jul 29, 2025

Maybe can add vim too? Found myself installing it a few times.

Good idea. I forgot about that. Added now.

Copy link
Contributor

@ishandhanani ishandhanani left a comment

Choose a reason for hiding this comment

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

Is this also required in the SGL runtime container?

@rmccorm4 rmccorm4 requested a review from GuanLuo July 29, 2025 17:57
@rmccorm4
Copy link
Contributor

rmccorm4 commented Jul 29, 2025

The runtime container image for VLLM is missing packages related to ibverbs, etc., which are essential for UCX to discover underlying RDMA devices

CC @GuanLuo who debugged an issue with RDMA not being setup/installed correctly in the past, leading to unexpected high TTFT times.

I think we're overdue for some sanity tests that all the NIXL/IB/RDMA related things are installed correctly in the container -- it seems like there is a lot of thrash on these containers where people make changes that unexpectedly break some aspect of these networking components and we don't find out until later. Any thoughts @karya0 @aranadive?

@GuanLuo
Copy link
Contributor

GuanLuo commented Jul 29, 2025

The change looks reasonable to me. Given the fact that we have done the same dance in NIXL installation part, I would suggest to pull this out as "nixl_dependency" file (similar to requirements.txt in Python or just installation script similar to install_vllm.sh) so we have centralized place for any future changes.

@karya0
Copy link
Contributor Author

karya0 commented Jul 29, 2025

The change looks reasonable to me. Given the fact that we have done the same dance in NIXL installation part, I would suggest to pull this out as "nixl_dependency" file (similar to requirements.txt in Python or just installation script similar to install_vllm.sh) so we have centralized place for any future changes.

Having a install script like install-nixl.sh, etc., is a good idea. Less errorprone than our current scheme. The only thing we'd lose out on is Docker build probably not using the cached step, but hopefully, not too much of an issue.

For now, how long before we can merge this PR? It looks like there are some unrelated trtllm failures in the gitlab ci.

@aranadive
Copy link
Contributor

The runtime container image for VLLM is missing packages related to ibverbs, etc., which are essential for UCX to discover underlying RDMA devices

CC @GuanLuo who debugged an issue with RDMA not being setup/installed correctly in the past, leading to unexpected high TTFT times.

I think we're overdue for some sanity tests that all the NIXL/IB/RDMA related things are installed correctly in the container -- it seems like there is a lot of thrash on these containers where people make changes that unexpectedly break some aspect of these networking components and we don't find out until later. Any thoughts @karya0 @aranadive?

@rmccorm4 @karya0
I looked at the dockerfiles.. There are couple of things missing:

  • Both trtllm and sglang are missing libibverbs, etc. from their build stages. Not sure if this was an oversight or intentional.
  • There is no separate common stage for nixl.

I think we need to introduce two stages in these dockerfile with regard to NIXL and its dependencies.

  • nixl_build - which uses the base image
  • nixl_runtime - which uses the runtime image
    We can add compilation of nixlbench to both to help with doing some sanity tests for nixl/ucx.

This would make it easier to track nixl dependencies and add to the stages there to keep everything in one place.

@karya0
Copy link
Contributor Author

karya0 commented Jul 29, 2025

The runtime container image for VLLM is missing packages related to ibverbs, etc., which are essential for UCX to discover underlying RDMA devices

CC @GuanLuo who debugged an issue with RDMA not being setup/installed correctly in the past, leading to unexpected high TTFT times.
I think we're overdue for some sanity tests that all the NIXL/IB/RDMA related things are installed correctly in the container -- it seems like there is a lot of thrash on these containers where people make changes that unexpectedly break some aspect of these networking components and we don't find out until later. Any thoughts @karya0 @aranadive?

@rmccorm4 @karya0 I looked at the dockerfiles.. There are couple of things missing:

  • Both trtllm and sglang are missing libibverbs, etc. from their build stages. Not sure if this was an oversight or intentional.
  • There is no separate common stage for nixl.

I think we need to introduce two stages in these dockerfile with regard to NIXL and its dependencies.

  • nixl_build - which uses the base image
  • nixl_runtime - which uses the runtime image
    We can add compilation of nixlbench to both to help with doing some sanity tests for nixl/ucx.

This would make it easier to track nixl dependencies and add to the stages there to keep everything in one place.

The base build images are different in all flavors: VLLM (nvcr.io/nvidia/cuda-dl-base) and TRTLLM (nvcr.io/nvidia/pytorch) SGLang (nvcr.io/nvidia/cuda-dl-base) . The runtime image is the same though: nvcr.io/nvidia/cuda

Having said that, I am not an expert/user of TRTLLM/SGLang so don't know if the omission is intentional or oversight.

@karya0
Copy link
Contributor Author

karya0 commented Jul 29, 2025

Updated to make NIXL dependency installation/declaration similar in all three variants

@alec-flowers alec-flowers merged commit 30d4612 into ai-dynamo:main Jul 29, 2025
9 of 10 checks passed
@karya0 karya0 deleted the ibverbs_rdma branch July 29, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contribution Pull request is from an external contributor fix size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants