Skip to content

fix(docker): persist the TRT-LLM wheel - #4153

Merged
terrykong merged 2 commits into
mainfrom
tde/trtllm_wheel_in_layer
Sep 17, 2026
Merged

terrykong merged 2 commits into
mainfrom
tde/trtllm_wheel_in_layer

Conversation

@tdene

@tdene tdene commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do ?

The hermetic TRT-LLM step writes the compiled wheel into a cache mount on the builder node. A later image layer build step copies the compiled wheel back into the image.

This causes the TRT-LLM venv build to fail if it runs anywhere other than the original builder node, because the builder will fetch cached layers of the image, then try to finish the build, but it cannot copy the compiled wheel because it's now on an empty mount. This type of layer cache hit happens whenever uv.lock is not updated, allowing previous images' layers to be reused.

#2420 originally introduced this issue, but #4002 exposed it. Before #4002, a failed venv could cause an image build that had a broken venv; after #4002, any failed venv will fail the entire image build process.

This change copies the TRT-LLM wheel into the image on the same layer as it is created, preventing this type of failure. This does not increase the image size because the wheel was already being copied in, just on a later layer. All this does is make sure that a layer cache hit will not cause a failure.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

Signed-off-by: Teodor-Dumitru Ene <teodord.ene@gmail.com>
@tdene
tdene requested a review from a team as a code owner September 16, 2026 11:34
@copy-pr-bot

copy-pr-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@tdene tdene added CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) CI:L1 Run doctests, unit tests, and functional tests and removed CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) labels Sep 16, 2026
@tdene

tdene commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c2447db

@kajalj22
kajalj22 self-requested a review September 16, 2026 15:35
@tdene

tdene commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 84dae7b

@terrykong
terrykong merged commit 702cd79 into main Sep 17, 2026
105 checks passed
@terrykong
terrykong deleted the tde/trtllm_wheel_in_layer branch September 17, 2026 18:19
yfw added a commit that referenced this pull request Sep 17, 2026
…d by #4153

main's #4153 makes the release stage read the mirrored wheel from
/opt/trtllm_wheels directly, so the re-seed block this branch added
(168aaac) is redundant there -- and after the merge it referenced
TRTLLM_WHEEL_CACHE_MIRROR_DIR, which that stage no longer exports, which
would have tripped `set -u`. The hermetic stage still writes the mirror.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants