Skip to content

[deps] Add libibverbs for RDMA support#10185

Open
RossCZ wants to merge 1 commit intohiyouga:mainfrom
RossCZ:add_libibverbs_for_rdma
Open

[deps] Add libibverbs for RDMA support#10185
RossCZ wants to merge 1 commit intohiyouga:mainfrom
RossCZ:add_libibverbs_for_rdma

Conversation

@RossCZ
Copy link

@RossCZ RossCZ commented Feb 12, 2026

What does this PR do?

Add libibverbs-dev library to the Dockerfile.base to support Remote Direct Memory Access (RDMA). This optimization enables faster node-to-node communication, leading to a significant reduction in distributed training times.

Before submitting

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @RossCZ, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates a key dependency into the Docker build process, enabling RDMA capabilities. This enhancement is designed to significantly improve the performance of distributed training by facilitating faster and more efficient inter-node data transfer, ultimately reducing training times.

Highlights

  • RDMA Support: Added the libibverbs-dev package to the Dockerfile.base to enable Remote Direct Memory Access (RDMA), which is crucial for optimizing node-to-node communication in distributed training.
Changelog
  • docker/docker-cuda/Dockerfile.base
    • Installed libibverbs-dev for RDMA support.
Activity
  • No activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds libibverbs-dev to support RDMA, which is a valuable optimization for distributed training. The implementation in the Dockerfile can be improved by combining the new RUN instruction with the preceding one. This will optimize the Docker image by reducing layers and avoiding a redundant apt-get update call, which is a recommended best practice for writing Dockerfiles.

Comment on lines +41 to +43
RUN apt-get update && \
apt-get install -y libibverbs-dev && \
apt-get clean
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To optimize the Docker image size and build time, it's recommended to combine apt-get commands into a single RUN layer. This new RUN instruction adds an unnecessary layer and runs apt-get update again. Please merge the installation of libibverbs-dev into the previous RUN command that installs gcc and g++, and then remove this new block.

The combined RUN command on lines 36-38 should be updated to:

RUN apt-get update && \
    apt-get install -y gcc g++ libibverbs-dev && \
    apt-get clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant