Skip to content

Commit 253dca8

Browse files
build: install cudnn-frontend from feat/1.29.0-megatron in fw_final image (#6427)
Signed-off-by: Zhiyu Li <zhiyul@nvidia.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 3a88793 commit 253dca8

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎docker/Dockerfile.fw_final‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ RUN pushd /opt/Export-Deploy && \
5757
echo "Container built with NeMo-Run commit hash: $NEMO_RUN_COMMIT" && \
5858
popd
5959

60+
# cuDNN Frontend is replaced after the sync below with this ref of NVIDIA/cudnn-frontend
61+
# (feat/1.29.0-megatron). Docker-only: outside fw_pyproject.toml and uv.lock. Set empty to keep the
62+
# PyPI wheel.
63+
ARG CUDNN_FRONTEND_GIT_REF=8924d4b41fd678ba1b98cd7f98bb78b222637573
64+
6065
# Sync environment
6166
COPY --chmod=644 docker/common/fw_pyproject.toml /opt/NeMo-FW/pyproject.toml
6267
COPY --chmod=644 docker/common/_version.py docker/common/print_sha.sh /opt/NeMo-FW/
@@ -69,6 +74,10 @@ RUN \
6974
BASE_RUNTIME_UV_ARGS="--no-install-package nvidia-cudnn-frontend --no-install-package transformer-engine --no-install-package transformer-engine-torch"; \
7075
fi && \
7176
uv sync --no-cache-dir --all-groups --inexact ${BASE_RUNTIME_UV_ARGS} && \
77+
if [ -n "$CUDNN_FRONTEND_GIT_REF" ] && [ "${MBRIDGE_PRESERVE_BASE_RUNTIME:-False}" != "True" ]; then \
78+
uv pip install --no-cache-dir --no-deps --reinstall \
79+
"nvidia-cudnn-frontend @ git+https://github.com/NVIDIA/cudnn-frontend.git@${CUDNN_FRONTEND_GIT_REF}"; \
80+
fi && \
7281
python /opt/preserve_base_runtime.py check /opt/base-runtime-packages.json && \
7382
uv pip list && \
7483
chmod +x print_sha.sh && \

‎docker/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ docker build \
250250
| `NEMO_EXPORT_DEPLOY_COMMIT` | NeMo Export-Deploy git commit SHA |
251251
| `NEMO_EVALUATOR_COMMIT` | NeMo Evaluator git commit SHA |
252252
| `NEMO_RUN_COMMIT` | NeMo Run git commit SHA |
253+
| `CUDNN_FRONTEND_GIT_REF` | Commit of [NVIDIA/cudnn-frontend](https://github.com/NVIDIA/cudnn-frontend) (`feat/1.29.0-megatron`) installed over the PyPI cuDNN frontend after the environment sync; empty keeps the PyPI wheel. Docker-only, outside `fw_pyproject.toml`; skipped when `PRESERVE_BASE_RUNTIME=True`. |
253254

254255
---
255256

0 commit comments

Comments
 (0)