update swift docker

This commit is contained in:
Jintao Huang
2025-07-29 10:54:42 +08:00
parent 2142b7a872
commit 55269a48f3
2 changed files with 9 additions and 4 deletions

View File

@@ -80,14 +80,14 @@ RUN if [ "$INSTALL_MS_DEPS" = "True" ]; then \
fi; \
if [ "$INSTALL_MEGATRON_DEPS" = "True" ]; then \
pip install "sglang[all]<0.4.7" math_verify -U && \
pip install liger_kernel nvitop pre-commit "transformers<4.52" huggingface-hub -U && \
pip install "liger_kernel<0.6" nvitop pre-commit "transformers<4.52" 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 git+https://github.com/NVIDIA/TransformerEngine.git@release_v2.3; \
pip install --no-build-isolation git+https://github.com/NVIDIA/TransformerEngine.git@release_v2.5#egg=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 / && rm -fr /tmp/apex && pip cache purge; \
pip install git+https://github.com/NVIDIA/Megatron-LM.git@core_r0.12.0; \
pip install git+https://github.com/NVIDIA/Megatron-LM.git@core_r0.13.0; \
fi
# install nvm and set node version to 18

View File

@@ -340,6 +340,11 @@ class LLMImageBuilder(Builder):
class SwiftImageBuilder(LLMImageBuilder):
def init_args(self, args) -> Any:
if not args.lmdeploy_version:
args.lmdeploy_version = '0.8.0'
return super().init_args(args)
def generate_dockerfile(self) -> str:
meta_file = './docker/install.sh'
with open('docker/Dockerfile.extra_install', 'r') as f:
@@ -348,7 +353,7 @@ class SwiftImageBuilder(LLMImageBuilder):
self.args.python_version)
extra_content += """
RUN pip install --no-cache-dir -U "deepspeed==0.16.*" --no-deps && \
pip install --no-cache-dir -U icecream soundfile pybind11
pip install --no-cache-dir -U icecream soundfile pybind11 py-spy
"""
version_args = (
f'{self.args.torch_version} {self.args.torchvision_version} {self.args.torchaudio_version} '