Skip to content

[TRTLLMINF-132][infra] Pre-bake fat sqsh to eliminate GPU idle time during CI pip installs#15398

Open
EmmaQiaoCh wants to merge 17 commits into
NVIDIA:mainfrom
EmmaQiaoCh:emma/split_env_and_test
Open

[TRTLLMINF-132][infra] Pre-bake fat sqsh to eliminate GPU idle time during CI pip installs#15398
EmmaQiaoCh wants to merge 17 commits into
NVIDIA:mainfrom
EmmaQiaoCh:emma/split_env_and_test

Conversation

@EmmaQiaoCh

@EmmaQiaoCh EmmaQiaoCh commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

…pip installs

Add a "fat sqsh" caching layer for SLURM/ENROOT CI jobs. The fat sqsh is an enroot .sqsh image pre-baked with TensorRT-LLM installed (base image + pip install requirements-dev.txt + wheel). GPU test jobs that reuse a cached fat sqsh skip the 10-18 min pip install phase entirely.

Key design:

  • Cache key: sha256(llmTarfile URL)[:16] — encodes commit + platform
  • Fat sqsh dir: ${cluster.scratchPath}/users/svc_tensorrt/fat_sqsh/
  • First job: imports base sqsh, builds fat sqsh inline in srunPrologue via fat_build_inline.sh; subsequent jobs reuse directly (SKIP_INSTALL=1)
  • Best-effort flock prevents duplicate concurrent builds; failures fall back to base sqsh + full slurm_install.sh (non-fatal)
  • Atomic publish via mv -f from .tmp; age-prune after 7 days
  • SKIP_INSTALL env var passed into container via --container-env; checked in slurm_install.sh to skip pip installs while still downloading the tarball (needed for source files by pytest)

Summary by CodeRabbit

  • Chores
    • Optimized internal build and test infrastructure with improved artifact cleanup and container image reuse during multi-node testing.
    • Enhanced installation process to skip redundant steps when preconditions are already met.

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)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • 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

To see a list of available CI bot commands, please comment /bot help.

…pip installs

Add a "fat sqsh" caching layer for SLURM/ENROOT CI jobs. The fat sqsh is
an enroot .sqsh image pre-baked with TensorRT-LLM installed (base image +
pip install requirements-dev.txt + wheel). GPU test jobs that reuse a cached
fat sqsh skip the 10-18 min pip install phase entirely.

Key design:
- Cache key: sha256(llmTarfile URL)[:16] — encodes commit + platform
- Fat sqsh dir: ${cluster.scratchPath}/users/svc_tensorrt/fat_sqsh/
- First job: imports base sqsh, builds fat sqsh inline in srunPrologue via
  fat_build_inline.sh; subsequent jobs reuse directly (SKIP_INSTALL=1)
- Best-effort flock prevents duplicate concurrent builds; failures fall back
  to base sqsh + full slurm_install.sh (non-fatal)
- Atomic publish via mv -f from .tmp; age-prune after 7 days
- SKIP_INSTALL env var passed into container via --container-env; checked in
  slurm_install.sh to skip pip installs while still downloading the tarball
  (needed for source files by pytest)

Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@EmmaQiaoCh
EmmaQiaoCh requested review from a team as code owners June 16, 2026 06:10
@EmmaQiaoCh
EmmaQiaoCh requested review from tburt-nv and yiqingy0 June 16, 2026 06:10
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a shared "fat sqsh" caching mechanism to the Jenkins ENROOT SLURM pipeline. A new fat_build_inline.sh script builds a fat sqsh by installing TensorRT-LLM into a base container and exporting it. The launcher prologue in L0_Test.groovy reuses existing fat sqsh artifacts (via hash) or builds one concurrently with flock. slurm_install.sh skips pip installs when SKIP_INSTALL=1, and both cleanup paths prune stale fat sqsh files.

Changes

Fat sqsh caching for ENROOT SLURM jobs

Layer / File(s) Summary
fat_build_inline.sh: build and export fat sqsh
jenkins/scripts/fat_build_inline.sh
New script that hashes the tarball URL to form a container name, writes an inline install.sh, runs it inside an enroot container, exports the result to a temp file, and atomically renames it to FAT_SQSH_PATH.
SKIP_INSTALL guard in slurm_install.sh
jenkins/scripts/slurm_install.sh
Adds a conditional that bypasses all pip install commands when SKIP_INSTALL=1, covering both the optional ray install and the two TensorRT-LLM installs.
Fat sqsh reuse logic in ENROOT launcher prologue
jenkins/L0_Test.groovy
Introduces path variables and upload of fat_build_inline.sh to the remote workspace; replaces prior container selection with a flock-coordinated reuse flow (hash-based reuse → base sqsh import → concurrent fat build → fallback). Passes SKIP_INSTALL as a container env var to srun and retains the fat-build script in retry keep-files.
Age-based fat sqsh cleanup
jenkins/L0_Test.groovy
cleanUpSlurmResources and cleanUpNodeResources both prune shared fat-*.sqsh and fat-*.sqsh.*.tmp files from cluster scratch paths.

Sequence Diagram

sequenceDiagram
  participant Jenkins as Jenkins Pipeline
  participant Remote as Remote SLURM Node
  participant Enroot as Enroot Runtime
  participant FatSqsh as Shared fat-hash.sqsh

  Jenkins->>Remote: upload fat_build_inline.sh
  Jenkins->>Remote: emit ENROOT launcher prologue
  Remote->>FatSqsh: check fat-<hash>.sqsh exists?
  alt fat sqsh exists
    FatSqsh-->>Remote: reuse fat-<hash>.sqsh, SKIP_INSTALL=1
  else fat sqsh missing
    Remote->>Enroot: import base sqsh (per-job)
    Remote->>Remote: flock: run fat_build_inline.sh
    alt fat build succeeds
      Enroot->>FatSqsh: atomic rename tmp sqsh → fat-<hash>.sqsh
      Remote->>Remote: switch to fat sqsh, SKIP_INSTALL=1
    else fat build fails
      Remote->>Remote: fall back to per-job base sqsh
    end
  end
  Remote->>Enroot: srun --container-env=SKIP_INSTALL
  Enroot->>Remote: slurm_install.sh checks SKIP_INSTALL, skips pip if set
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: introducing a fat sqsh caching layer to reduce GPU idle time during CI pip installs, with proper ticket and type formatting.
Description check ✅ Passed The PR description clearly explains what (fat sqsh caching), why (reduce GPU idle time), and how (design details, cache key, build process, concurrency, cleanup). However, the 'Test Coverage' and explicit description sections remain as template placeholders and are not filled out.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@jenkins/L0_Test.groovy`:
- Around line 1266-1271: The fatHash calculation for the fat-sqsh cache key only
includes llmTarfile, but the fat sqsh is built from both the base container
image and the llmTarfile. Modify the fatHash computation to include the base
image (LLM_DOCKER_IMAGE) along with llmTarfile in the hash calculation to ensure
the cache key reflects all build-affecting inputs. This prevents reusing an
incompatible cached sqsh when the same tar URL is used with a different base
image. Additionally, consider including Ray or install profile information in
the key if fat_build_inline.sh does not unconditionally bake those dependencies.

In `@jenkins/scripts/fat_build_inline.sh`:
- Around line 1-11: The file fat_build_inline.sh is missing the required NVIDIA
copyright header block. Add the appropriate NVIDIA copyright and license header
to the beginning of the file, immediately after the shebang (#!/bin/bash line).
The header should include copyright notice and reference to the applicable open
source license for TensorRT-LLM, consistent with other source files in the
repository.
- Around line 32-33: The echo statement at line 32-33 logs the full
LLM_TARFILE_URL variable, which may contain sensitive pre-signed tokens or
credentials in query parameters. Instead of logging the complete URL directly,
sanitize or redact the URL before printing it to the log. Extract only the base
URL portion (without query parameters) or use a redaction method to mask the
sensitive parts while keeping enough information for debugging purposes. Replace
the direct reference to $LLM_TARFILE_URL in the echo statement with a sanitized
version that removes credential-bearing query parameters.

In `@jenkins/scripts/slurm_install.sh`:
- Line 31: The variable `pytestCommand` at line 31 in the condition `if [[
$pytestCommand == *--run-ray* ]]; then` is accessed without protection against
undefined variable errors, which violates the `set -u` (nounset) mode enabled by
`set -xEeuo pipefail`. Since `pytestCommand` may not be assigned until later
(line 63), the check at line 31 will fail when running in non-Disaggregated mode
where `slurm_install_setup()` is called before the assignment. Replace the
unguarded variable reference with a safe parameter expansion that provides a
default value, such as `${pytestCommand:-}` or `${pytestCommand:+...}`, to
prevent triggering a nounset error.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 20869e82-454c-4829-b17b-6574e45ce622

📥 Commits

Reviewing files that changed from the base of the PR and between 0ec3250 and a08e421.

📒 Files selected for processing (3)
  • jenkins/L0_Test.groovy
  • jenkins/scripts/fat_build_inline.sh
  • jenkins/scripts/slurm_install.sh

Comment thread jenkins/L0_Test.groovy Outdated
Comment thread jenkins/scripts/fat_build_inline.sh
Comment thread jenkins/scripts/fat_build_inline.sh Outdated
Comment thread jenkins/scripts/slurm_install.sh
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #54495 [ run ] triggered by Bot. Commit: a08e421 Link to invocation

- Include LLM_DOCKER_IMAGE in fat sqsh hash key so a base image change
  with the same tarfile URL correctly busts the cache
- Add NVIDIA SPDX copyright header to fat_build_inline.sh
- Sanitize tarfile URL before logging (strip query params) to avoid
  leaking any credential-bearing query parameters
- Use ${pytestCommand:-} to guard against nounset failure under set -u

Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #54495 [ run ] completed with state SUCCESS. Commit: a08e421
/LLM/main/L0_MergeRequest_PR pipeline #43558 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run

Signed-off-by: Emma Qiao <qqiao@nvidia.com>
Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58018 [ run ] triggered by Bot. Commit: b35bdc4 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58018 [ run ] completed with state SUCCESS. Commit: b35bdc4
/LLM/main/L0_MergeRequest_PR pipeline #46689 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58114 [ run ] triggered by Bot. Commit: b35bdc4 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58114 [ run ] completed with state FAILURE. Commit: b35bdc4
/LLM/main/L0_MergeRequest_PR pipeline #46775 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "B300-PyTorch-2, DGX_A100-FMHA-Post-Merge-1, DGX_B200-AutoDeploy-1" --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58386 [ run ] triggered by Bot. Commit: 3c2e04d Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #58386 [ run ] completed with state SUCCESS. Commit: 3c2e04d
/LLM/main/L0_MergeRequest_PR pipeline #47010 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: Emma Qiao <qqiao@nvidia.com>
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "B300-PyTorch-2, DGX_A100-FMHA-Post-Merge-1, DGX_B200-AutoDeploy-1" --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59141 [ run ] triggered by Bot. Commit: 8de58b1 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59141 [ run ] completed with state FAILURE. Commit: 8de58b1
/LLM/main/L0_MergeRequest_PR pipeline #47651 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-AutoDeploy-1"

1 similar comment
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-AutoDeploy-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59578 [ run ] triggered by Bot. Commit: b5348d2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59578 [ run ] completed with state FAILURE. Commit: b5348d2
/LLM/main/L0_MergeRequest_PR pipeline #48025 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Fat sqsh was installing TRT-LLM into /opt/trtllm/ inside the container,
but GPU test jobs expect the source tree at /tmp/TensorRT-LLM/src
(LLM_ROOT=/tmp/TensorRT-LLM/src). Change fat_build_inline.sh to cd /tmp
before extracting the tarball so the layout matches the non-fat-sqsh path.
Update slurm_install.sh SKIP_INSTALL branch accordingly (resourcePathNode=/tmp).

Also add tail -f of the CPU builder's SLURM log during the Prepare Container
poll loop so package versions and install progress are visible in Jenkins output.

Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_A100-FMHA-Post-Merge-1, DGX_B200-AutoDeploy-1" --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59605 [ run ] triggered by Bot. Commit: 8a55433 Link to invocation

@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-AutoDeploy-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59625 [ run ] triggered by Bot. Commit: 8a55433 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59605 [ run ] completed with state ABORTED. Commit: 8a55433

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59625 [ run ] completed with state FAILURE. Commit: 8a55433
/LLM/main/L0_MergeRequest_PR pipeline #48065 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-AutoDeploy-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59654 [ run ] triggered by Bot. Commit: 4bece35 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59654 [ run ] completed with state FAILURE. Commit: 4bece35
/LLM/main/L0_MergeRequest_PR pipeline #48089 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-AutoDeploy-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59682 [ run ] triggered by Bot. Commit: 4bece35 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59682 [ run ] completed with state SUCCESS. Commit: 4bece35
/LLM/main/L0_MergeRequest_PR pipeline #48114 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-AutoDeploy-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59702 [ run ] triggered by Bot. Commit: 8c3a820 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59702 [ run ] completed with state SUCCESS. Commit: 8c3a820
/LLM/main/L0_MergeRequest_PR pipeline #48132 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200" --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59837 [ run ] triggered by Bot. Commit: bbd6191 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59837 [ run ] completed with state SUCCESS. Commit: bbd6191
/LLM/main/L0_MergeRequest_PR pipeline #48247 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: EmmaQiaoCh <qqiao@nvidia.com>
@EmmaQiaoCh

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "DGX_B200-AutoDeploy-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59945 [ run ] triggered by Bot. Commit: 1f05003 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #59945 [ run ] completed with state FAILURE. Commit: 1f05003
/LLM/main/L0_MergeRequest_PR pipeline #48346 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

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.

2 participants