Skip to content

Conversation

@MartinMarciniszyn
Copy link
Collaborator

@MartinMarciniszyn MartinMarciniszyn commented Aug 22, 2025

Summary by CodeRabbit

  • Chores
    • Optimized container build by installing the wheel directly during the build process, eliminating extra copy and cleanup steps. This reduces intermediate filesystem handling and can yield leaner images and faster builds.
    • Updated CI configuration to include a canonical image name used for tagging and publishing, improving consistency across pipelines. No changes to runtime features or public interfaces.

NB: The IMAGE_NAME fixes build problems for trtllm_build target in Makefile.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

📝 Walkthrough

Walkthrough

Updates Docker release image stage to install the built wheel via BuildKit bind-mount from the wheel stage instead of copying, removing manual cleanup. Adds IMAGE_NAME property to Jenkins image tags configuration; existing tags unchanged.

Changes

Cohort / File(s) Summary of Changes
Docker release-stage wheel install
docker/Dockerfile.multi
Replaced COPY-based wheel transfer and pip install/cleanup with a single RUN using BuildKit bind-mount from the wheel stage and direct pip install /tmp/wheel/tensorrt_llm*.whl. Removed explicit wheel copy and cache cleanup commands.
Jenkins image naming
jenkins/current_image_tags.properties
Added property IMAGE_NAME=urm.nvidia.com/sw-tensorrt-docker/tensorrt-llm. No other tag lines modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Shixiaowei02
  • chzblych
  • niukuo
  • yuanjingx87

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • 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.
  • 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 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/Issue comments)

Type @coderabbitai help to get the list of available commands.

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 or @coderabbitai title anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@MartinMarciniszyn
Copy link
Collaborator Author

/bot run --skip-test

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)
docker/Dockerfile.multi (1)

134-135: Make the mount read-only and harden pip install to avoid accidental network hits.

Two small robustness tweaks:

  • Add ,ro to the bind mount to prevent accidental writes to the mounted build directory.
  • Consider --no-index so pip never reaches out to the network in the release stage.

Apply this minimal diff:

-RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,from=wheel,source=/src/tensorrt_llm/build,target=/tmp/wheel \
-    pip install /tmp/wheel/tensorrt_llm*.whl
+RUN --mount=type=cache,target=/root/.cache/pip \
+    --mount=type=bind,from=wheel,source=/src/tensorrt_llm/build,target=/tmp/wheel,ro \
+    pip install --no-index /tmp/wheel/tensorrt_llm*.whl
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c232ba8 and 1aa6b98.

📒 Files selected for processing (2)
  • docker/Dockerfile.multi (1 hunks)
  • jenkins/current_image_tags.properties (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-08-20T15:04:42.848Z
Learnt from: dbari
PR: NVIDIA/TensorRT-LLM#7095
File: docker/Dockerfile.multi:168-168
Timestamp: 2025-08-20T15:04:42.848Z
Learning: In docker/Dockerfile.multi, wildcard COPY for benchmarks (${CPP_BUILD_DIR}/benchmarks/*Benchmark) is intentionally used instead of directory copy because the benchmarks directory contains various other build artifacts during C++ builds, and only specific benchmark executables should be copied to the final image.

Applied to files:

  • docker/Dockerfile.multi
📚 Learning: 2025-08-01T15:14:45.673Z
Learnt from: yibinl-nvidia
PR: NVIDIA/TensorRT-LLM#6506
File: examples/models/core/mixtral/requirements.txt:3-3
Timestamp: 2025-08-01T15:14:45.673Z
Learning: In TensorRT-LLM, examples directory can have different dependency versions than the root requirements.txt file. Version conflicts between root and examples dependencies are acceptable because examples are designed to be standalone and self-contained.

Applied to files:

  • docker/Dockerfile.multi
📚 Learning: 2025-08-21T00:16:56.427Z
Learnt from: farshadghodsian
PR: NVIDIA/TensorRT-LLM#7101
File: docs/source/blogs/tech_blog/blog9_Deploying_GPT_OSS_on_TRTLLM.md:36-36
Timestamp: 2025-08-21T00:16:56.427Z
Learning: TensorRT-LLM container release tags in documentation should only reference published NGC container images. The README badge version may be ahead of the actual published container versions.

Applied to files:

  • jenkins/current_image_tags.properties
⏰ 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: Pre-commit Check
🔇 Additional comments (3)
docker/Dockerfile.multi (1)

134-135: Nice swap to BuildKit bind-mount; trims image layers and avoids wheel cleanup.

This RUN with a mount from the wheel stage installs the wheel without copying artifacts into the final image. Good use of cache mounts for pip as well.

jenkins/current_image_tags.properties (2)

14-14: Adding IMAGE_NAME looks good and aligns with existing tags.

The value matches the registry prefix used by the downstream LLM_*_DOCKER_IMAGE tags, and keeps the file sh-parseable as required by the header notes.


14-14: Downstream IMAGE_NAME usage verified; no drift risk

All references to Docker image names have been checked:

  • Jenkins test and merge pipelines (e.g. L0_Test.groovy, L0_MergeRequest.groovy) consume the fully qualified LLM_DOCKER_IMAGE / LLM_SBSA_DOCKER_IMAGE variables, not the raw IMAGE_NAME property.
  • The BuildDockerImage.groovy script defines its own staging registry in a hard-coded IMAGE_NAME = "urm.nvidia.com/sw-tensorrt-docker/tensorrt-llm-staging", so it remains unaffected by changes to jenkins/current_image_tags.properties.
  • The docker/Makefile targets under docker/ correctly source IMAGE_NAME from jenkins/current_image_tags.properties for local builds, which is the intended behavior.

No conflicting definitions or silent mismatches were found. Updating IMAGE_NAME in jenkins/current_image_tags.properties to the new base (urm.nvidia.com/sw-tensorrt-docker/tensorrt-llm) aligns with existing conventions and does not require further downstream adjustments.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16207 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16207 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #12188 (Partly Tested) completed with status: 'SUCCESS'

@dbari
Copy link
Collaborator

dbari commented Aug 25, 2025

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16405 [ run ] triggered by Bot

@dbari
Copy link
Collaborator

dbari commented Aug 25, 2025

I suggest doing the same change for line 175

By the way, I started a build just for the docker images, because they were not built in the previous one. I'll check the result afterwards.

@MartinMarciniszyn
Copy link
Collaborator Author

I suggest doing the same change for line 175

We use the wheel stage as the base for tritonbuild. I don't see what we should optimize here using bind mounts.

@dbari
Copy link
Collaborator

dbari commented Aug 25, 2025

I suggest doing the same change for line 175

We use the wheel stage as the base for tritonbuild. I don't see what we should optimize here using bind mounts.

Oops, yes, you're right, there is no copy there.

By the way, I also found a 1.4GB waste in our base image pytorch:25.06-py3, but it is solved in pytorch:25.08-py3, so no need for action regarding this.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16405 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #12329 (Partly Tested) completed with status: 'FAILURE'

Copy link
Collaborator

@dbari dbari left a comment

Choose a reason for hiding this comment

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

I checked the image built by the CI and as expected, the wheel is removed from intermediate storage.

@MartinMarciniszyn
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16536 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16536 [ run ] completed with state FAILURE
/LLM/main/L0_MergeRequest_PR pipeline #12418 (Partly Tested) completed with status: 'FAILURE'

@MartinMarciniszyn
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16574 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16574 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #12446 (Partly Tested) completed with status: 'FAILURE'

@MartinMarciniszyn
Copy link
Collaborator Author

/bot run --stage-list "Build-Docker-Images"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16657 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16657 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #12506 (Partly Tested) completed with status: 'FAILURE'

@MartinMarciniszyn MartinMarciniszyn enabled auto-merge (squash) August 27, 2025 15:09
@MartinMarciniszyn
Copy link
Collaborator Author

/bot skip --comment "ucxx builds are randomly failing independent of the changes here"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16710 [ skip ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #16710 [ skip ] completed with state SUCCESS
Skipping testing for commit 503aa6c

@MartinMarciniszyn MartinMarciniszyn merged commit 7cfa475 into NVIDIA:main Aug 27, 2025
4 checks passed
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.

4 participants