Skip to content

Conversation

aranadive
Copy link
Contributor

@aranadive aranadive commented Jun 2, 2025

Overview:

This PR gets dynamo NIXL EFA/RDMA support in container inline with what NIXL base container will have.

Details:

Modified Dockerfile.vllm to install correct RDMA headers to detect IB devices correctly when reinstalling UCX. Also, the container build script is modified to build for EFA using a specific known good ref (similar to what we will have in NIXL). Updated the NIXL build to use release type.

Where should the reviewer start?

container/Dockerfile.vllm

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

Summary by CodeRabbit

  • New Features

    • Added an optional build configuration to enable EFA support during container image creation.
    • Introduced a command-line option to select EFA support in the build script.
  • Chores

    • Ensured all necessary RDMA-related libraries are installed for improved device detection.
    • Made the UCX version used in builds configurable via a build argument.
    • Updated build process to consistently use release mode for all architectures.
  • Documentation

    • Added guidance for building containers with EFA support when deploying in AWS environments.

aranadive added 5 commits June 2, 2025 12:31
Add a build arg to script to use EFA ref for UCX. Otherwise, use the
previoud ref.

Signed-off-by: Adit Ranadive <aranadive@nvidia.com>
Signed-off-by: Adit Ranadive <aranadive@nvidia.com>
Signed-off-by: Adit Ranadive <aranadive@nvidia.com>
Signed-off-by: Adit Ranadive <aranadive@nvidia.com>
Signed-off-by: Adit Ranadive <aranadive@nvidia.com>
@aranadive aranadive marked this pull request as ready for review June 2, 2025 22:11
Copy link
Contributor

coderabbitai bot commented Jun 2, 2025

Walkthrough

The changes introduce improved flexibility and support for building with RDMA and EFA capabilities. The Dockerfile adds installation of RDMA-related dependencies, parameterizes the UCX version with a build argument, and enforces a release build type for NIXL. The build script adds a --make-efa option to select an EFA-capable UCX commit and passes the version as a build argument. The README is updated to document the --make-efa usage for AWS deployments.

Changes

File(s) Change Summary
container/Dockerfile.vllm Added RDMA dependencies, introduced NIXL_UCX_REF build arg, made UCX version dynamic, enforced release build for NIXL.
container/build.sh Added --make-efa option, set NIXL_UCX_REF for EFA builds, updated help, passed build arg to Docker.
README.md Added note about using --make-efa flag for AWS deployments with EFA support.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant build.sh
    participant Dockerfile

    User->>build.sh: Run with or without --make-efa
    build.sh->>build.sh: Parse options
    alt --make-efa specified
        build.sh->>build.sh: Set NIXL_UCX_REF to EFA commit
    else
        build.sh->>build.sh: Use default UCX ref
    end
    build.sh->>Dockerfile: Pass NIXL_UCX_REF as build-arg
    Dockerfile->>Dockerfile: Install RDMA deps
    Dockerfile->>Dockerfile: Checkout UCX at NIXL_UCX_REF
    Dockerfile->>Dockerfile: Build UCX and NIXL (release mode)
Loading

Poem

In the warren where the code does dwell,
New options bloom—EFA as well!
RDMA libraries join the fray,
UCX builds flex in a brand-new way.
With release mode set and rabbits proud,
We hop through builds—fast, not loud!
🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cf90882 and b11f4d8.

📒 Files selected for processing (3)
  • README.md (1 hunks)
  • container/Dockerfile.vllm (2 hunks)
  • container/build.sh (4 hunks)
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • container/Dockerfile.vllm
  • container/build.sh
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Mirror Repository to GitLab
  • GitHub Check: Build and Test - vllm

🪧 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: 2

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

89-93: Optimize UCX repository clone depth and checkout
Switching to dynamic $NIXL_UCX_REF is helpful, but the git clone fetches full history. Consider a shallow clone:

 RUN cd /usr/local/src &&                            \
-   git clone https://github.com/openucx/ucx.git && \
+   git clone --branch ${NIXL_UCX_REF} --depth 1 https://github.com/openucx/ucx.git && \
    cd ucx &&                                       \
    git checkout $NIXL_UCX_REF &&                   \
    ./autogen.sh && ./configure \

This reduces image size and clone time.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d3ca766 and 3640223.

📒 Files selected for processing (2)
  • container/Dockerfile.vllm (2 hunks)
  • container/build.sh (4 hunks)
🔇 Additional comments (6)
container/build.sh (3)

115-115: Introduce EFA-specific UCX commit reference
The new NIXL_UCX_EFA_REF variable cleanly captures the EFA-capable UCX commit hash.


252-254: Handle --make-efa option to override UCX ref
The new CLI flag correctly assigns NIXL_UCX_REF to the EFA commit. Consider whether it should be mutually exclusive with other ref overrides (e.g., --release-build) to avoid unintended combinations.

I recommend verifying that invoking --make-efa does not inadvertently skip or override other intended build arguments.


353-354: Update help message for new EFA option
The help text now documents --make-efa, which aligns with the added functionality.

container/Dockerfile.vllm (3)

82-82: Parameterize UCX checkout reference
Introducing ARG NIXL_UCX_REF=v1.19.x makes the UCX version pluggable. Ensure the default tag v1.19.x matches a valid branch or tag in the UCX repo, or consider using a more precise default (e.g., v1.19.5).

Please validate that v1.19.x resolves to an existing ref in https://github.com/openucx/ucx.git.


127-127: Enforce release build type for ARM64 Meson
The --buildtype=release flag ensures optimized NIXL builds on ARM64. This aligns with best practices.


134-134: Enforce release build type for x86 Meson
Similarly, the release build for non-ARM architectures standardizes performance builds.

Copy link
Contributor

@GuanLuo GuanLuo left a comment

Choose a reason for hiding this comment

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

Based on the discussion I think this change will not alter existing EFA installation (not really enabling support), approving in case we want to cherry-pick this for quickly work around the regression.

That being said, should follow up on this discussion for possible alternative for EFA support

Copy link
Contributor

@rmccorm4 rmccorm4 left a comment

Choose a reason for hiding this comment

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

Left comment about supporting EFA by default in future - if we are keeping it opt-in, please document it somewhere easy to find. If we can make it supported by default soon without tradeoffs, let's do that.

Update UCX SHA1 from NIXL.

Signed-off-by: Adit Ranadive <aranadive@nvidia.com>
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 (1)
README.md (1)

74-75: Refine section heading and grammar for clarity.

The plural “cloud environments” section only covers AWS; rename to “Note about AWS environments:”. Also add a comma after “AWS” for correct phrasing and format the flag inline as code:

- Notes about cloud environments:
- If deploying Dynamo in AWS then make sure to build container with EFA support using the --make-efa flag.
+ ## Note about AWS environments:
+ - If deploying Dynamo in AWS, make sure to build the container with EFA support using the `--make-efa` flag.
🧰 Tools
🪛 LanguageTool

[typographical] ~75-~75: Consider adding a comma.
Context: ...vironments: - If deploying Dynamo in AWS then make sure to build container with EFA s...

(IF_THEN_COMMA)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3640223 and cf90882.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • container/build.sh (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • container/build.sh
🧰 Additional context used
🪛 LanguageTool
README.md

[typographical] ~75-~75: Consider adding a comma.
Context: ...vironments: - If deploying Dynamo in AWS then make sure to build container with EFA s...

(IF_THEN_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and Test - vllm

Signed-off-by: Adit Ranadive <aranadive@nvidia.com>
@aranadive aranadive merged commit f7b3ccf into main Jun 4, 2025
10 checks passed
@aranadive aranadive deleted the aranadive/update_efa_docker branch June 4, 2025 19:36
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.

4 participants