Skip to content

Commit 5ec9a59

Browse files
committed
fix megatron build
1 parent ca61edc commit 5ec9a59

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

scripts/docker/Dockerfile.megatron

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ RUN pip install --upgrade pip \
3131
&& pip install -e .[mm,dev] \
3232
&& pip install flash_attn==2.8.1 --no-build-isolation \
3333
&& pip install -e .[megatron] \
34-
&& pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation \
34+
&& NVCC_APPEND_FLAGS="--threads 4" APEX_PARALLEL_BUILD=8 pip install -v \
35+
--disable-pip-version-check --no-cache-dir --no-build-isolation \
3536
--config-settings "--build-option=--cpp_ext" \
3637
--config-settings "--build-option=--cuda_ext" \
3738
--resume-retries 20 git+https://github.com/NVIDIA/apex.git

scripts/docker/Dockerfile.uv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ RUN . /opt/venv/bin/activate && \
4242
RUN . /opt/venv/bin/activate && \
4343
uv pip install -e.[flash_attn] && \
4444
uv pip install -e .[megatron] && \
45+
NVCC_APPEND_FLAGS="--threads 4" APEX_PARALLEL_BUILD=8 \
4546
uv pip install -v --no-build-isolation \
4647
--config-settings="--build-option=--cpp_ext" \
4748
--config-settings="--build-option=--cuda_ext" \

0 commit comments

Comments
 (0)