Skip to content

Commit b71a70b

Browse files
committed
Make llama3.1 8b reference runnable by upgrading pytorch version
Signed-off-by: ShriyaRishab <spalsamudram@nvidia.com>
1 parent 8346a11 commit b71a70b

2 files changed

Lines changed: 4 additions & 37 deletions

File tree

small_llm_pretraining/nemo/Dockerfile.h200

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
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
2323
FROM ${FROM_IMAGE_NAME}
2424

2525
# Document build setup
@@ -29,8 +29,7 @@ ENV CUSTOM_FROM_IMAGE_NAME ${FROM_IMAGE_NAME}
2929
# Custom libraries version
3030
WORKDIR /workspace/
3131

32-
ARG GIT_COMMIT_ID
33-
ENV GIT_COMMIT_ID=$GIT_COMMIT_ID
32+
ENV PIP_CONSTRAINT=""
3433

3534
RUN git config --global user.name "a" && \
3635
git config --global user.email "a"
@@ -39,38 +38,6 @@ WORKDIR /workspace/
3938

4039
RUN pip install numcodecs==0.13.1
4140

42-
## 1. Apex
43-
ARG APEX_REVISION=SKIP
44-
ENV CUSTOM_APEX_REVISION ${APEX_REVISION}
45-
ARG APEX_MAX_JOBS=4
46-
47-
RUN if [ "${APEX_REVISION}" != SKIP ]; then \
48-
git clone https://github.com/NVIDIA/apex && \
49-
cd apex && \
50-
echo APEX_REVISION=${APEX_REVISION} && \
51-
git checkout ${APEX_REVISION} && \
52-
echo APEX_COMMIT_HASH=$(git rev-parse HEAD) && \
53-
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" . \
54-
; fi
55-
56-
57-
58-
## 2. Transformer Engine
59-
ARG TE_REVISION=SKIP
60-
ENV CUSTOM_TE_REVISION ${TE_REVISION}
61-
62-
RUN if [ "${TE_REVISION}" != SKIP ]; then \
63-
pip uninstall -y transformer-engine && \
64-
git clone https://github.com/NVIDIA/TransformerEngine.git transformerengine && \
65-
cd transformerengine && \
66-
git checkout ${TE_REVISION} && \
67-
echo TE_COMMIT_HASH=$(git rev-parse HEAD) && \
68-
echo $(git rev-parse HEAD) > /TE_COMMIT_HASH.env && \
69-
git submodule init && git submodule update && \
70-
NVTE_CUDA_ARCHS="90;100" NVTE_UB_WITH_MPI=1 NVTE_FRAMEWORK=pytorch MPI_HOME=/usr/local/mpi pip install --force-reinstall --no-deps . \
71-
; fi
72-
73-
7441
## 3. NeMo
7542
ARG NEMO_REVISION=v2.1.0
7643
ENV CUSTOM_NEMO_REVISION ${NEMO_REVISION}
@@ -120,14 +87,14 @@ RUN if [ "${MCORE_REVISION}" != SKIP ]; then \
12087
git checkout ${MCORE_REVISION} && \
12188
echo MCORE_COMMIT_HASH=$(git rev-parse HEAD) && \
12289
echo $(git rev-parse HEAD) > /MCORE_COMMIT_HASH.env && \
90+
sed -i "/triton/d" requirements/pytorch_24.10/requirements.txt && \
12391
pip install . && \
12492
cd megatron/core/datasets && \
12593
make \
12694
; fi
12795

12896
ENV PYTHONPATH "${PYTHONPATH}:/workspace/Megatron-LM"
12997

130-
13198
WORKDIR /workspace/code
13299

133100
# Copy the current state of the code inside the image

small_llm_pretraining/nemo/run_llama31.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if [ $TENSOR_PARALLEL_SIZE -gt 0 ]; then
123123
fi
124124

125125
# Allows MLLogger objects to be constructed locally
126-
if [ ! -d /mlperf-outputs ]; then mkdir /mlperf-outputs; fi
126+
if [ ! -d "${LOCAL_MLPERF_OUTPUTS}" ]; then mkdir -p "${LOCAL_MLPERF_OUTPUTS}"; fi
127127

128128
set -x
129129

0 commit comments

Comments
 (0)