From dd396ac37217a4d8375c6f2b23adb5aab0775eb3 Mon Sep 17 00:00:00 2001 From: hjh0119 Date: Thu, 20 Aug 2026 11:03:16 +0800 Subject: [PATCH] pin modelscope-hub branch --- docker/Dockerfile.ubuntu | 1 + docker/build_image.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index aa4077e6..76303be4 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -63,6 +63,7 @@ RUN export PIP_EXTRA_INDEX_URL="${PIP_EXTRA_INDEX_URL}" && \ pip install ms-agent -U --no-dependencies && \ cd / && rm -fr /tmp/ms-swift && pip cache purge; \ cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b {modelscope_branch} --single-branch https://github.com/modelscope/modelscope.git && \ + {modelscope_hub_install} \ cd modelscope && pip install . -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \ cd / && rm -fr /tmp/modelscope && pip cache purge; \ pip install --no-cache-dir torch=={torch_version} torchvision=={torchvision_version} torchaudio=={torchaudio_version} {index_url} && \ diff --git a/docker/build_image.py b/docker/build_image.py index 82b8193a..ca828a59 100644 --- a/docker/build_image.py +++ b/docker/build_image.py @@ -78,6 +78,11 @@ class Builder: ) def _save_dockerfile(self, content: str) -> None: + content = content.replace( + '{modelscope_hub_install}', + 'pip install --no-cache-dir ' + '"modelscope_hub @ git+https://github.com/modelscope/modelscope_hub.git@release/0.3" &&' + ) if os.path.exists('./Dockerfile'): os.remove('./Dockerfile') with open('./Dockerfile', 'w') as f: