Skip to content

Conversation

@MartinMarciniszyn
Copy link
Collaborator

@MartinMarciniszyn MartinMarciniszyn commented Nov 11, 2025

Summary by CodeRabbit

  • Refactor
    • Consolidated Docker installation steps into multi-command runs to reduce build layers and optimize build time
    • Added conditional component installation based on system type
    • Improved cleanup of installation scripts for a smaller image footprint

Description

Test Coverage

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...

Provide a user friendly way for developers to interact with a Jenkins server.

Run /bot [-h|--help] to print this help message.

See details below for each supported subcommand.

run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]

Launch build/test pipelines. All previously running jobs will be killed.

--reuse-test (optional)pipeline-id (OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.

--disable-reuse-test (OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.

--disable-fail-fast (OPTIONAL) : Disable fail fast on build/tests/infra failures.

--skip-test (OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.

--stage-list "A10-PyTorch-1, xxx" (OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.

--gpu-type "A30, H100_PCIe" (OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.

--test-backend "pytorch, cpp" (OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.

--only-multi-gpu-test (OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.

--disable-multi-gpu-test (OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.

--add-multi-gpu-test (OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.

--post-merge (OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.

--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" (OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".

--detailed-log (OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.

--debug (OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in the stage-list parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.

For guidance on mapping tests to stage names, see docs/source/reference/ci-overview.md
and the scripts/test_to_stage_mapping.py helper.

kill

kill

Kill all running builds associated with pull request.

skip

skip --comment COMMENT

Skip testing for latest commit on pull request. --comment "Reason for skipping build/test" is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

reuse-pipeline

reuse-pipeline

Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

📝 Walkthrough

Walkthrough

Consolidates multiple Docker RUN instructions into fewer, larger steps by combining sequential component installations (base, cmake, ccache, cuda_toolkit, tensorrt, polygraphy, mpi4py, pytorch, opencv) into single RUN commands. Introduces TORCH_INSTALL_TYPE ARG earlier in the devel stage, groups UCX/NIXL/etcd installations together, adds conditional mooncake installation in the triton stage for non-Rocky8 systems, and reduces image layers through batch cleanup of installer scripts.

Changes

Cohort / File(s) Summary
Docker multi-stage build consolidation
docker/Dockerfile.multi
Consolidates base component installations (base, cmake, ccache, cuda_toolkit, tensorrt, polygraphy, mpi4py, pytorch, opencv) from separate RUN steps into single multi-command RUN. Introduces TORCH_INSTALL_TYPE ARG threading. Groups UCX, NIXL, etcd installations into dedicated RUN. Adds mooncake installation to triton stage with conditional execution (non-Rocky8 only). Adjusts COPY to include install_mooncake.sh. Updates cleanup to batch-remove installer scripts, reducing Docker layers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Build order verification: Ensure consolidated command sequences maintain correct dependency ordering and no circular dependencies are introduced.
  • Conditional mooncake logic: Verify the Rocky8 condition (if [ "$os_release" != "8" ] or equivalent) executes correctly and cleanup follows both branches.
  • Layer caching impact: Confirm consolidation doesn't negatively affect layer caching strategy for incremental builds.
  • Script removal timing: Validate that batch removal of installer scripts doesn't occur prematurely before their execution completes.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is essentially empty, containing only the template structure with no actual content filled in the Description or Test Coverage sections. Fill in the Description section explaining what changes were made and why (e.g., consolidating Docker RUN steps to reduce image layers). Add Test Coverage section listing relevant tests that validate the Docker image builds correctly.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and specifically identifies the main change: consolidating Docker RUN steps to reduce layers in the devel image.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • 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

Comment @coderabbitai help to get the list of available commands and usage tips.

@MartinMarciniszyn MartinMarciniszyn changed the title [None][chore]: reduce the layers of the devel docker image [None][chore] reduce the layers of the devel docker image Nov 11, 2025
@MartinMarciniszyn MartinMarciniszyn force-pushed the user/martinma/docker_combine_layers branch from 2a34bd8 to 7d1b18c Compare November 12, 2025 09:59
@MartinMarciniszyn
Copy link
Collaborator Author

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

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24295 [ run ] triggered by Bot. Commit: 7d1b18c

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24295 [ run ] completed with state FAILURE. Commit: 7d1b18c
/LLM/main/L0_MergeRequest_PR pipeline #18329 (Partly Tested) completed with status: 'FAILURE'

@MartinMarciniszyn MartinMarciniszyn requested a review from a team as a code owner November 13, 2025 17:27
@MartinMarciniszyn
Copy link
Collaborator Author

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

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24485 [ run ] triggered by Bot. Commit: 5a6246a

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24485 [ run ] completed with state ABORTED. Commit: 5a6246a
LLM/main/L0_MergeRequest_PR #18480 (Blue Ocean) completed with status: ABORTED

Signed-off-by: Martin Marciniszyn Mehringer <11665257+MartinMarciniszyn@users.noreply.github.com>
Signed-off-by: Martin Marciniszyn Mehringer <11665257+MartinMarciniszyn@users.noreply.github.com>
@MartinMarciniszyn MartinMarciniszyn force-pushed the user/martinma/docker_combine_layers branch from 5a6246a to 62fcbfc Compare November 14, 2025 08:41
Signed-off-by: Martin Marciniszyn Mehringer <11665257+MartinMarciniszyn@users.noreply.github.com>
@MartinMarciniszyn
Copy link
Collaborator Author

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

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24585 [ run ] triggered by Bot. Commit: 99dca35

Signed-off-by: Martin Marciniszyn Mehringer <11665257+MartinMarciniszyn@users.noreply.github.com>
@MartinMarciniszyn
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24593 [ run ] triggered by Bot. Commit: a403a49

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24585 [ run ] completed with state ABORTED. Commit: 99dca35
LLM/main/L0_MergeRequest_PR #18557 (Blue Ocean) completed with status: ABORTED

@tensorrt-cicd
Copy link
Collaborator

PR_Github #24593 [ run ] completed with state SUCCESS. Commit: a403a49
/LLM/main/L0_MergeRequest_PR pipeline #18564 completed with status: 'SUCCESS'

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