mirror of
https://github.com/modelscope/modelscope.git
synced 2026-09-01 19:49:03 +02:00
pin modelscope-hub branch
This commit is contained in:
@@ -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} && \
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user