1919# DEALINGS IN THE SOFTWARE.
2020
2121
22- ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:25.01 -py3
22+ ARG FROM_IMAGE_NAME=nvcr.io/nvidia/pytorch:25.04 -py3
2323FROM ${FROM_IMAGE_NAME}
2424
2525# Document build setup
@@ -29,8 +29,7 @@ ENV CUSTOM_FROM_IMAGE_NAME ${FROM_IMAGE_NAME}
2929# Custom libraries version
3030WORKDIR /workspace/
3131
32- ARG GIT_COMMIT_ID
33- ENV GIT_COMMIT_ID=$GIT_COMMIT_ID
32+ ENV PIP_CONSTRAINT=""
3433
3534RUN git config --global user.name "a" && \
3635 git config --global user.email "a"
@@ -51,38 +50,6 @@ ENV PIP_CONSTRAINT=/pip_torch_constraint.txt
5150
5251RUN pip install numcodecs==0.13.1
5352
54- ## 1. Apex
55- ARG APEX_REVISION=SKIP
56- ENV CUSTOM_APEX_REVISION ${APEX_REVISION}
57- ARG APEX_MAX_JOBS=4
58-
59- RUN if [ "${APEX_REVISION}" != SKIP ]; then \
60- git clone https://github.com/NVIDIA/apex && \
61- cd apex && \
62- echo APEX_REVISION=${APEX_REVISION} && \
63- git checkout ${APEX_REVISION} && \
64- echo APEX_COMMIT_HASH=$(git rev-parse HEAD) && \
65- MAX_JOBS=${APEX_MAX_JOBS} NVCC_APPEND_FLAGS="--threads 8" pip install -v --no-build-isolation --no-cache-dir --disable-pip-version-check --config-settings "--build-option=--cpp_ext --cuda_ext --bnp --xentropy --deprecated_fused_adam --deprecated_fused_lamb --fast_multihead_attn --distributed_lamb --fast_layer_norm --transducer --distributed_adam --fmha --fast_bottleneck --nccl_p2p --peer_memory --permutation_search --focal_loss --fused_conv_bias_relu --index_mul_2d --cudnn_gbn --group_norm" . \
66- ; fi
67-
68-
69-
70- ## 2. Transformer Engine
71- ARG TE_REVISION=SKIP
72- ENV CUSTOM_TE_REVISION ${TE_REVISION}
73-
74- RUN if [ "${TE_REVISION}" != SKIP ]; then \
75- pip uninstall -y transformer-engine && \
76- git clone https://github.com/NVIDIA/TransformerEngine.git transformerengine && \
77- cd transformerengine && \
78- git checkout ${TE_REVISION} && \
79- echo TE_COMMIT_HASH=$(git rev-parse HEAD) && \
80- echo $(git rev-parse HEAD) > /TE_COMMIT_HASH.env && \
81- git submodule init && git submodule update && \
82- NVTE_CUDA_ARCHS="90;100" NVTE_UB_WITH_MPI=1 NVTE_FRAMEWORK=pytorch MPI_HOME=/usr/local/mpi pip install --force-reinstall --no-deps . \
83- ; fi
84-
85-
8653## 3. NeMo
8754ARG NEMO_REVISION=v2.1.0
8855ENV CUSTOM_NEMO_REVISION ${NEMO_REVISION}
@@ -132,6 +99,7 @@ RUN if [ "${MCORE_REVISION}" != SKIP ]; then \
13299 git checkout ${MCORE_REVISION} && \
133100 echo MCORE_COMMIT_HASH=$(git rev-parse HEAD) && \
134101 echo $(git rev-parse HEAD) > /MCORE_COMMIT_HASH.env && \
102+ sed -i "/triton/d" requirements/pytorch_24.10/requirements.txt && \
135103 pip install . && \
136104 cd megatron/core/datasets && \
137105 make \
0 commit comments