Skip to content

[https://nvbugs/5563653][infra] reduce docker image layers - #8222

Closed
ZhanruiSunCh wants to merge 120 commits into
NVIDIA:release/1.1from
ZhanruiSunCh:user/zhanruis/1009_fix_too_many_docker_layers
Closed

[https://nvbugs/5563653][infra] reduce docker image layers#8222
ZhanruiSunCh wants to merge 120 commits into
NVIDIA:release/1.1from
ZhanruiSunCh:user/zhanruis/1009_fix_too_many_docker_layers

Conversation

@ZhanruiSunCh

@ZhanruiSunCh ZhanruiSunCh commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Refactor

    • Consolidated installation steps across development and Triton images to reduce layers and simplify build stages.
    • Unified script handling improves consistency and maintainability without altering behavior.
  • Chores

    • Reduced Docker image layers for smaller images and potentially faster builds and pulls.
    • Streamlined build process improves reliability across stages with consistent script availability.
    • No functional changes to runtime features; installations continue to be applied as before.

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

  • 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.

Details

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.

lucaslie and others added 30 commits September 25, 2025 22:05
…adata (NVIDIA#8002)

Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: peaceh <103117813+peaceh-nv@users.noreply.github.com>
…ion ration under kv cache manager (NVIDIA#7923)

By default, we allocate equal proportion shares of memory for all
window sizes (see the else case). With TRTLLM_WINDOW_SIZE_SHARES,
we can override this behavior to adjust the memory share of each
window size. For example, if we have window size of [512, 32768],
then setting TRTLLM_WINDOW_SIZE_SHARES=0.4,0.6 will be allocating
40% of the memory to window size 512 and 60% of the memory to window
size 32768.

Signed-off-by: eopXD <yuehtingc@nvidia.com>
Signed-off-by: xinhe-nv <200704525+xinhe-nv@users.noreply.github.com>
Signed-off-by: xinhe-nv <200704525+xinhe-nv@users.noreply.github.com>
Signed-off-by: Fred Wei <20514172+WeiHaocheng@users.noreply.github.com>
…DIA account in GitHub profiles (NVIDIA#8022)

Signed-off-by: Martin Marciniszyn Mehringer <11665257+MartinMarciniszyn@users.noreply.github.com>
…r GC (NVIDIA#7995)

Signed-off-by: Tailing Yuan <yuantailing@gmail.com>
…tween cduagraph and no-graph flow (NVIDIA#7669)

Signed-off-by: Hui Gao <huig@nvidia.com>
…#7161)

Signed-off-by: Yue Weng <25103990+yweng0828@users.noreply.github.com>
Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com>
…8 ckpt (Qwen3-235B-A22B-FP8) (NVIDIA#7856)

Signed-off-by: Jhao-Ting Chen <jhaotingc@nvidia.com>
Signed-off-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com>
Signed-off-by: Fridah-nv <201670829+Fridah-nv@users.noreply.github.com>
…se path (NVIDIA#6348)

Signed-off-by: Iman Tabrizian <10105175+tabrizian@users.noreply.github.com>
Signed-off-by: Xianjie <5410381+qiaoxj07@users.noreply.github.com>
…#8030)

Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
…VIDIA#8008)

Signed-off-by: Christina Zhang <83400082+ChristinaZ@users.noreply.github.com>
NVIDIA#8035)

Signed-off-by: nv-guomingz <137257613+nv-guomingz@users.noreply.github.com>
NVIDIA#8034)

Signed-off-by: nv-guomingz <137257613+nv-guomingz@users.noreply.github.com>
Signed-off-by: Fred Wei <20514172+WeiHaocheng@users.noreply.github.com>
…oTuner profiling cache (NVIDIA#7738)

To achieve determinism for the AutoTuner profiling cache, serialization and deserialization are introduced to store the cache on disk in JSON format. Use TLLM_AUTOTUNER_CACHE_PATH to indicate the path where the cache file should be stored:

Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com>
…ne as a llm arg (NVIDIA#7898)

Signed-off-by: Zongfei Jing <20381269+zongfeijing@users.noreply.github.com>
Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
…A#8048)

Signed-off-by: Zhenhua Wang <zhenhuaw@nvidia.com>
Signed-off-by: Zhenhua Wang <4936589+zhenhuaw-me@users.noreply.github.com>
…8049)

Signed-off-by: Kaiyu Xie <26294424+kaiyux@users.noreply.github.com>
…VIDIA#7588)

Signed-off-by: Eran Geva <19514940+MrGeva@users.noreply.github.com>
Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com>
ixlmar and others added 21 commits October 6, 2025 06:09
…VIDIA#8121)

Signed-off-by: ixlmar <206748156+ixlmar@users.noreply.github.com>
Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com>
Signed-off-by: Izzy Putterman <iputterman@nvidia.com>
Signed-off-by: Perkz Zheng <67892460+PerkzZheng@users.noreply.github.com>
Signed-off-by: list <58580514+farazkh80@users.noreply.github.com>
Signed-off-by: Vincent Huang <vincenth@nvidia.com>
Co-authored-by: Perkz Zheng <67892460+PerkzZheng@users.noreply.github.com>
Co-authored-by: Vincent Huang <vincenth@nvidia.com>
…VIDIA#8162)

Signed-off-by: Kanghwan Jang <861393+karljang@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: qqiao <qqiao@nvidia.com>
Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com>
…g flag in WIDEEP MoE backend (NVIDIA#8141)

Signed-off-by: Sergey Klevtsov <sklevtsov@nvidia.com>
…VIDIA#8016)

Signed-off-by: Ruodi Lu <ruodil@users.noreply.github.com>
Co-authored-by: Ruodi Lu <ruodil@users.noreply.github.com>
…DIA#8159)

Signed-off-by: Lanyu Liao <lancelly@users.noreply.github.com>
Co-authored-by: Lanyu Liao <lancelly@users.noreply.github.com>
…ion (NVIDIA#8132)

Signed-off-by: ixlmar <206748156+ixlmar@users.noreply.github.com>
Signed-off-by: Balaram Buddharaju <169953907+brb-nv@users.noreply.github.com>
Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com>
…er rebooting (NVIDIA#8193)

Signed-off-by: Lanyu Liao <lancelly@users.noreply.github.com>
Co-authored-by: Lanyu Liao <lancelly@users.noreply.github.com>
Signed-off-by: Dongfeng Yu <dongfengy@nvidia.com>
Signed-off-by: dongfengy <99041270+dongfengy@users.noreply.github.com>
Signed-off-by: junq <22017000+QiJune@users.noreply.github.com>
…IA#7869)

Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com>
Signed-off-by: bhsueh <11360707+byshiue@users.noreply.github.com>
Signed-off-by: ZhanruiSunCh <184402041+ZhanruiSunCh@users.noreply.github.com>
@ZhanruiSunCh
ZhanruiSunCh requested a review from a team October 9, 2025 08:40
@ZhanruiSunCh
ZhanruiSunCh requested a review from a team as a code owner October 9, 2025 08:40
@coderabbitai

coderabbitai Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Consolidates multiple COPY steps in docker/Dockerfile.multi into bulk COPY operations within devel and triton stages, while retaining the same install.sh-driven RUN commands. Per-script COPYs for base, cmake, ccache, CUDA toolkit, TensorRT, Polygraphy, mpi4py, PyTorch, Triton, UCX, NIXL, and etcd are removed/replaced by the bulk approach.

Changes

Cohort / File(s) Summary
Devel stage script consolidation
docker/Dockerfile.multi
Replaced many per-script COPYs with a single bulk COPY for install.sh and related installers (base, cmake, ccache, cuda_toolkit, tensorrt, polygraphy, mpi4py, pytorch). RUN steps continue invoking install.sh with arguments; layer count reduced.
Triton stage consolidation
docker/Dockerfile.multi
Replaced individual COPYs with one bulk COPY for Triton-related installers (install_triton.sh, install_ucx.sh, install_nixl.sh, install_etcd.sh). Unified RUN to execute install_triton.sh; removed scattered per-script COPYs.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Builder
  participant Devel as Devel Stage
  participant Triton as Triton Stage
  participant Scripts as Install Scripts

  rect rgb(235, 245, 255)
  note over Devel: Bulk COPY pattern
  Builder->>Devel: COPY install.sh + install_*.sh (base, cmake, ccache, cuda, tensorrt, polygraphy, mpi4py, pytorch)
  Devel->>Scripts: RUN ./install.sh base|cmake|ccache|cuda|tensorrt|polygraphy|mpi4py|pytorch
  end

  rect rgb(240, 250, 240)
  note over Triton: Bulk COPY pattern
  Builder->>Triton: COPY install_triton.sh + install_ucx.sh + install_nixl.sh + install_etcd.sh
  Triton->>Scripts: RUN ./install_triton.sh
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description consists mostly of the unmodified template and lacks a concrete title, filled‐in “## Description” and “## Test Coverage” sections, and does not indicate which checklist items apply or are completed, so it does not satisfy the repository’s required PR description structure. Please replace the template placeholders with a proper title following the ticket/type format, provide a concise description of the issue and solution under “## Description,” list relevant tests under “## Test Coverage,” and mark or annotate each PR Checklist item to show that it has been reviewed and addressed.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “[https://nvbugs/5563653][infra] reduce docker image layers” succinctly follows the repository’s tagging convention and accurately captures the primary change of consolidating Docker COPY steps to reduce image layers. It clearly reflects the main objective of the pull request without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ 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.

@ZhanruiSunCh
ZhanruiSunCh changed the base branch from main to release/1.1 October 10, 2025 02:16
@ZhanruiSunCh
ZhanruiSunCh requested a review from a team as a code owner October 10, 2025 02:16
@ZhanruiSunCh

Copy link
Copy Markdown
Collaborator Author

target release/1.1 #8250

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.