From 2b74b94b0e510346246c215fe6f2e4f283b6152a Mon Sep 17 00:00:00 2001 From: Jintao Huang Date: Thu, 8 Jan 2026 11:17:05 +0800 Subject: [PATCH] update swift3.12 --- docker/Dockerfile.ubuntu | 4 ++-- docker/build_image.py | 12 ++++++------ docker/install.sh | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index 4dde049e..b527baed 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -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"] diff --git a/docker/build_image.py b/docker/build_image.py index 76f8e451..36a19f3f 100644 --- a/docker/build_image.py +++ b/docker/build_image.py @@ -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: diff --git a/docker/install.sh b/docker/install.sh index 7cff4bba..371ef927 100644 --- a/docker/install.sh +++ b/docker/install.sh @@ -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