Upgrade base image to pytorch:26.03-py3 and remove Apex/TE/Megatron#15611
Upgrade base image to pytorch:26.03-py3 and remove Apex/TE/Megatron#15611pzelasko wants to merge 15 commits into
Conversation
…RT-LLM The CI container had torchao 0.14.0 which is incompatible with recent peft (requires >=0.16.0), causing test_salm_lora to fail. Upgrade the base NGC PyTorch image to 26.03 (torchao 0.17, PyTorch 2.11) and drop all build/install machinery for Apex, TransformerEngine, Megatron-LM, and TensorRT-LLM since NeMo is now Speech AI only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
Re-add trt-llm entry in manifest.json, trt()/trtllm() functions in install_dep.sh, TRTLLM build args in CI workflows, trt_llm.patch, and the external/patches bind mount in Dockerfile.ci. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
The wheel package is debian-installed without a RECORD file in pytorch:26.03-py3, causing 'pip install -U wheel' to fail with 'uninstall-no-record-file'. Install wheel separately with --ignore-installed so pip places a newer version in the higher-priority /usr/local site-packages directory. Signed-off-by: Piotr Żelasko <petezor@gmail.com>
PyYAML is debian-installed without a RECORD file in pytorch:26.03-py3, so 'pip install .[all,cu12]' fails with 'uninstall-no-record-file' when transformers/peft try to upgrade it. Add PyYAML to the --ignore-installed pre-install alongside wheel, using the same shadowing strategy. Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
9407cc6 to
e60e773
Compare
The pytorch:26.03-py3 NGC base image ships with CUDA 13, so installing cu12-suffixed wheels (cuda-python<13, numba-cuda[cu12], nvidia-cuda-*-cu12) alongside the CUDA 13 runtime is wasteful and can cause conflicts. Switch .[all,cu12] to .[all,cu13] in Dockerfile.ci. Note: the docs workflows still reference --no-extra cu12 and need to be updated by someone with workflow-scope token access. Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
|
I'll monitor this PR until CI is green. I'll post a plan for any fix and wait for your approval before pushing anything. Ping me by removing 'Has Babysitter' to cancel. |
Tests were failing at import time with
RuntimeError: operator torchvision::nms does not exist
because torchvision's compiled ops were built against a different torch
than the one loaded at runtime.
The previous pin captured pip freeze *after* install_dep.sh had already
run. install_dep.sh's extra() does `pip install ${DEPS[@]}` (no --no-deps,
no constraint) which resolves deps of nvidia-modelopt/nemo_run, and pip's
default "prefer stable" behavior could swap the NGC pre-release
torchvision (built against torch 2.11.0a0+nv26.3) with a stable PyPI
build that expects a different torch ABI. We then "pinned" the
already-broken state and perpetuated it.
Capture pip freeze for torch/torchvision/torchaudio/triton *before* any
pip install runs, and export PIP_CONSTRAINT so both install_dep.sh and
the final .[all,cu13] install cannot choose anything other than the NGC
versions.
Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
|
I wasn't able to investigate the CI failure in |
|
Babysitter deactivated for this PR. |
The previous fix captured the NGC torch stack with
pip freeze --all | grep '^(torch|...)==' > /tmp/nv-pinned.txt || true
but NGC's pip freeze emits torch/torchvision/torchaudio as direct-URL
installs (`torch @ file:///opt/pytorch/...`), not `name==version`. The
grep matched nothing, the pin file was empty, PIP_CONSTRAINT pointed at
an empty file, and pip happily swapped
torch 2.11.0a0+a6c236b9fd.nv26.3.46836102 -> torch 2.9.1
triton 3.6.0+git5d72932fc5.nv26.3 -> triton 3.5.1
while leaving NGC torchvision 0.25.0a0+nv26.3 in place. Result: at
import time `torchvision::nms` is registered against the NGC torch
TORCH_LIBRARY that no longer exists, and every unit-test job died on
RuntimeError: operator torchvision::nms does not exist
Fix: capture versions via importlib.metadata, which reads METADATA
directly and is agnostic to how pip recorded the install source.
Also add a final diagnostic block that (a) logs the post-install torch
stack with `pip freeze` and (b) runs `from torchvision.ops import nms`
as a load-bearing probe, so any future ABI regression fails the
container build instead of silently surfacing at pytest time.
Signed-off-by: Piotr Żelasko <pzelasko@nvidia.com>
|
@ko3n1g the PR Babysitter is restricted to the NVIDIA-NeMo |
|
Babysitter deactivated for this PR. |
|
I'll monitor this PR until CI is green. I'll post a plan for any fix and wait for your approval before pushing anything. Ping me by removing 'Has Babysitter' to cancel. |
|
I wasn't able to investigate the CI failure in |
|
Babysitter deactivated for this PR. |
|
Closing this PR in favor of #15638 |
The CI container had torchao 0.14.0 which is incompatible with recent peft (requires >=0.16.0), causing test_salm_lora to fail. Upgrade the base NGC PyTorch image to 26.03 (torchao 0.17, PyTorch 2.11) and drop all build/install machinery for Apex, TransformerEngine, Megatron-LM, and TensorRT-LLM since NeMo is now Speech AI only.
Important
The
Update branchbutton must only be pressed in very rare occassions.An outdated branch is never blocking the merge of a PR.
Please reach out to the automation team before pressing that button.
What does this PR do ?
Upgrade base image to pytorch:26.03-py3 and remove Apex/TE/Megatron/TRT-LLM.
The CI container had torchao 0.14.0 which is incompatible with recent peft (requires >=0.16.0), causing test_salm_lora to fail. Upgrade the base NGC PyTorch image to 26.03 (torchao 0.17, PyTorch 2.11) and drop all build/install machinery for Apex, TransformerEngine, Megatron-LM, and TensorRT-LLM since NeMo is now Speech AI only.
Collection: CI
Changelog
Usage
# Add a code snippet demonstrating how to use thisGitHub Actions CI
The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.
The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".
Before your PR is "Ready for review"
Pre checks:
PR Type:
If you haven't finished some of the above items you can still open "Draft" PR.
Who can review?
Anyone in the community is free to review the PR once the checks have passed.
Contributor guidelines contains specific people who can review PRs to various areas.
Additional Information