update swift3.12

This commit is contained in:
Jintao Huang
2026-01-08 11:17:05 +08:00
parent fcf9299eb4
commit 2b74b94b0e
3 changed files with 10 additions and 10 deletions

View File

@@ -76,14 +76,13 @@ RUN bash /tmp/install.sh {version_args} && \
RUN if [ "$IMAGE_TYPE" = "swift" ]; then \
pip install "sglang<0.5.6" math_verify "gradio<5.33" "deepspeed<0.18" ray -U && \
pip install math_verify "gradio<5.33" "deepspeed<0.18" ray -U && \
pip install liger_kernel wandb swanlab nvitop pre-commit "transformers<4.58" "trl<0.25" "peft<0.18" huggingface-hub -U && \
pip install --no-build-isolation transformer_engine[pytorch]; \
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" ./ && \
cd / && rm -fr /tmp/apex && pip cache purge; \
pip install git+https://github.com/NVIDIA/Megatron-LM.git@core_r0.15.0; \
pip uninstall autoawq nvidia-cudnn-cu12 -y; \
mkdir -p /root/.cache/modelscope/_github; \
git -C /root/.cache/modelscope/_github clone https://github.com/NVIDIA/Megatron-LM.git Megatron-LM --branch core_r0.15.0; \
elif [ "$IMAGE_TYPE" = "llm" ]; then \
@@ -104,4 +103,5 @@ ENV VLLM_USE_MODELSCOPE=True
ENV LMDEPLOY_USE_MODELSCOPE=True
ENV MODELSCOPE_CACHE=/mnt/workspace/.cache/modelscope/
ENV MEGATRON_LM_PATH=/root/.cache/modelscope/_github/Megatron-LM
ENV SWIFT_PATCH_CONV3D=1
SHELL ["/bin/bash", "-c"]

View File

@@ -348,15 +348,15 @@ class SwiftImageBuilder(LLMImageBuilder):
def init_args(self, args) -> Any:
if not args.base_image:
args.base_image = 'nvidia/cuda:12.9.1-cudnn-devel-ubuntu22.04'
args.base_image = 'nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04'
if not args.cuda_version:
args.cuda_version = '12.9.1'
args.cuda_version = '12.8.1'
if not args.torch_version:
args.torch_version = '2.8.0'
args.torchaudio_version = '2.8.0'
args.torchvision_version = '0.23.0'
args.torch_version = '2.9.0'
args.torchaudio_version = '2.9.0'
args.torchvision_version = '0.24.0'
if not args.vllm_version:
args.vllm_version = '0.11.0'
args.vllm_version = '0.13.0'
if not args.lmdeploy_version:
args.lmdeploy_version = '0.10.1'
if not args.flashattn_version:

View File

@@ -10,11 +10,11 @@ flashattn_version=${7:-2.7.1.post4}
pip uninstall -y torch torchvision torchaudio
pip install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version --index-url https://download.pytorch.org/whl/cu129
pip install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version
pip install --no-cache-dir -U autoawq lmdeploy==$lmdeploy_version
pip install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version --index-url https://download.pytorch.org/whl/cu129
pip install --no-cache-dir torch==$torch_version torchvision==$torchvision_version torchaudio==$torchaudio_version
pip install --no-cache-dir tiktoken transformers_stream_generator bitsandbytes deepspeed torchmetrics decord optimum openai-whisper