update swift docker

This commit is contained in:
Jintao Huang
2025-10-20 20:34:33 +08:00
parent fb57a99c57
commit 50a7391d2f
2 changed files with 12 additions and 11 deletions

View File

@@ -76,15 +76,16 @@ RUN bash /tmp/install.sh {version_args} && \
RUN if [ "$IMAGE_TYPE" = "swift" ]; then \
pip install "sglang[all]<0.5" "math_verify==0.5.2" "gradio<5.33" -U && \
pip install liger_kernel wandb swanlab nvitop pre-commit "transformers<4.57" "trl<0.21" huggingface-hub -U && \
pip install "sglang[all]<0.6" "math_verify==0.5.2" "gradio<5.33" -U && \
pip install liger_kernel wandb swanlab nvitop pre-commit "transformers<4.58" "trl<0.24" huggingface-hub -U && \
SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])") && echo $SITE_PACKAGES && \
CUDNN_PATH=$SITE_PACKAGES/nvidia/cudnn CPLUS_INCLUDE_PATH=$SITE_PACKAGES/nvidia/cudnn/include \
pip install --no-build-isolation transformer_engine[pytorch]; \
cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/NVIDIA/apex && \
cd apex && git checkout e13873debc4699d39c6861074b9a3b2a02327f92 && 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 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.13.0; \
pip uninstall autoawq -y; \
elif [ "$IMAGE_TYPE" = "llm" ]; then \
pip install --no-cache-dir huggingface-hub transformers peft diffusers -U; \
pip uninstall autoawq -y; \

View File

@@ -348,19 +348,19 @@ class SwiftImageBuilder(LLMImageBuilder):
def init_args(self, args) -> Any:
if not args.base_image:
args.base_image = 'nvidia/cuda:12.6.3-devel-ubuntu22.04'
args.base_image = 'nvidia/cuda:12.8.1-devel-ubuntu22.04'
if not args.cuda_version:
args.cuda_version = '12.6.3'
args.cuda_version = '12.8.1'
if not args.torch_version:
args.torch_version = '2.7.1'
args.torchaudio_version = '2.7.1'
args.torchvision_version = '0.22.1'
args.torch_version = '2.8.0'
args.torchaudio_version = '2.8.0'
args.torchvision_version = '0.23.0'
if not args.vllm_version:
args.vllm_version = '0.10.1.1'
args.vllm_version = '0.11.0'
if not args.lmdeploy_version:
args.lmdeploy_version = '0.9.2.post1'
args.lmdeploy_version = '0.10.1'
if not args.flashattn_version:
args.flashattn_version = '2.7.4.post1'
args.flashattn_version = '2.8.1'
return super().init_args(args)
def generate_dockerfile(self) -> str: