update swift env

This commit is contained in:
hjh0119
2026-08-20 21:04:37 +08:00
parent 859b2e742e
commit 0ed953417d

View File

@@ -83,10 +83,14 @@ RUN export PIP_EXTRA_INDEX_URL="${PIP_EXTRA_INDEX_URL}" && \
NVTE_WITH_NCCL_EP=0 NVTE_FRAMEWORK=pytorch MAX_JOBS=16 \
pip install --no-cache-dir --no-build-isolation "transformer_engine[pytorch]==2.18.0"; \
cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/NVIDIA/apex && \
cd apex && pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ || \
echo "WARNING: apex build failed; megatron-core falls back to Torch Norm."; \
cd apex && pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./ && \
cd / && rm -fr /tmp/apex && pip cache purge; \
pip install --no-cache-dir "megatron-core==0.18.*" -U; \
pip install --no-cache-dir git+https://github.com/deepseek-ai/DeepGEMM.git@v2.1.1.post3 --no-build-isolation && \
pip install --no-cache-dir -U flash-linear-attention --no-build-isolation && \
pip install --no-cache-dir -U git+https://github.com/Dao-AILab/causal-conv1d --no-build-isolation && \
pip install --no-cache-dir git+https://github.com/Dao-AILab/fast-hadamard-transform --no-build-isolation && \
pip install --no-cache-dir git+https://github.com/NVIDIA-NeMo/Emerging-Optimizers.git@v0.3.0; \
elif [ "$IMAGE_TYPE" = "cpu" ]; then \
pip install --no-cache-dir huggingface-hub transformers peft diffusers -U; \
else \