fix(docker): install TransformerEngine from rolling wheels - #1796
Merged
Conversation
The CUDA image downloads complete TransformerEngine wheel sets but discards them and rebuilds 2.17 from PyPI, keeping image builds dependent on source compilation. Select the cu12/cu13 core per variant, require the exact 2.17 meta/core/torch triplet, install only those local wheels, and validate installed versions plus the torch wheel core pin.
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
The PR Docker gate built only amd64, so arm64 failures in the release build could land on main unnoticed. Build the cu13 PR tag as one amd64+arm64 manifest, extract the TransformerEngine triplet verification into a bind-mounted helper, and wire that helper into exact Docker build triggers.
yueming-yuan
approved these changes
Jul 26, 2026
yueming-yuan
added a commit
that referenced
this pull request
Jul 26, 2026
#1796 switched TransformerEngine to the rolling wheels installed with --no-deps. That pins the three TE dists to exactly those wheels, which is the point, but it also drops transformer_engine_torch's own runtime requirements: einops, onnx, onnxscript, pydantic, nvdlfw-inspect. transformer_engine.pytorch imports onnxscript unconditionally on its core import path (module/__init__ -> layernorm_linear -> base -> _common -> export -> onnx_extensions), so every image built since #1796 fails at ModuleNotFoundError: No module named 'onnxscript' as soon as anything touches TE -- which is every GPU test. verify_transformer_engine.py did not catch it because it only compared versions and metadata and called find_spec('transformer_engine'), which resolves the package directory without importing it. Check that every non-TE requirement of transformer_engine_torch is actually installed, so the build fails at the layer that introduced the gap instead of shipping a green image.
yueming-yuan
added a commit
that referenced
this pull request
Jul 27, 2026
#1796 switched TransformerEngine to the rolling wheels installed with --no-deps. That pins the three TE dists to exactly those wheels, which is the point, but it also drops transformer_engine_torch's own runtime requirements: einops, onnx, onnxscript, pydantic, nvdlfw-inspect. transformer_engine.pytorch imports onnxscript unconditionally on its core import path (module/__init__ -> layernorm_linear -> base -> _common -> export -> onnx_extensions), so every image built since #1796 fails at ModuleNotFoundError: No module named 'onnxscript' as soon as anything touches TE -- which is every GPU test. verify_transformer_engine.py did not catch it because it only compared versions and metadata and called find_spec('transformer_engine'), which resolves the package directory without importing it. Check that every non-TE requirement of transformer_engine_torch is actually installed, so the build fails at the layer that introduced the gap instead of shipping a green image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Install the complete TransformerEngine 2.17 wheel triplet from each CUDA
variant's rolling wheels release.
Symptom & Reproduction
then discards or bypasses them and resolves TransformerEngine from PyPI or a
source build.
rolling releases contain complete 2.17 meta, CUDA core, and torch wheels.
Root Cause
docker/Dockerfile:108deletes the downloaded TransformerEngine wheels onthe CUDA 13 path.
docker/Dockerfile:114installs TransformerEngine 2.17 outside therolling-release contract on both CUDA paths.
Fix
Select the cu12 or cu13 core by image variant, require exactly one 2.17
meta/core/torch triplet, and install only those local wheels without dependency
resolution. Validate the installed versions and the torch wheel's exact pin to
the selected CUDA core.
Verification
git diff --checkRUNinstruction with/bin/sh.docker/build.py --dry-runforcu13-x86,cu13-aarch64, andcu12-x86.installation does not provide
buildx.Review Focus
docker/Dockerfile.--no-depsinstall against the complete rolling-releasecontract.