Skip to Content
MS-SWIFT × TWINKLE
🚀 开始使用
DOCUMENTATION5.0.0.dev

🐳 Docker 镜像

📦 镜像来源

ms-swift 镜像由 ModelScope 仓库的 docker 目录 构建,build_image.py 负责拼接标签,Dockerfile 按平台拆分:Dockerfile.ubuntu / Dockerfile.ubuntu_base 为 NVIDIA GPU 基础镜像,Dockerfile.amd,ascend/,Metax/ 分别对应 AMD,昇腾,沐曦。镜像预装 CUDA,PyTorch,vLLM,ModelScope 与 ms-swift,标签依次包含这些组件的版本。

我们提供了 GPU 镜像可以直接使用。同一镜像在三个地域的地址如下,选择距离运行环境较近的 registry:

# swift5.0.0
modelscope-registry.cn-hangzhou.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda13.0.3-py312-torch2.14.0-vllm0.33.0-modelscope1.40.3-swift5.0.0
modelscope-registry.cn-beijing.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda13.0.3-py312-torch2.14.0-vllm0.33.0-modelscope1.40.3-swift5.0.0
modelscope-registry.us-west-1.cr.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda13.0.3-py312-torch2.14.0-vllm0.33.0-modelscope1.40.3-swift5.0.0

镜像已自带 ms-swift 及相关依赖,直接运行快速启动的 SFT 或 GRPO 示例。采样器,数学奖励及其他任务依赖按对应示例安装。

📦 主要软件包

软件版本
Ubuntu22.04
CUDA>=13.0
Python>=3.12
torch>=2.6
transformers>=5.8
mcore-bridge>=1.7
megatron-core>=0.18
transformer-engine>=2.16
flash-attn>=2.8
flash-linear-attention>=0.5
vllm>=0.20
modelscope>=1.40
ms-swift>=5.0
twinkle-kit / twinkle-server / twinkle-client>=1.0
ray>=2.55

AMD,NPU 等平台的设备映射和运行时不同,按硬件支持中的平台资料准备环境。