From 52e227c48ba081ad1f87db33d969da43032ef553 Mon Sep 17 00:00:00 2001 From: Yunnglin Date: Mon, 15 Jun 2026 17:43:30 +0800 Subject: [PATCH] fix(docker): force numpy>=2.0 after evalscope install ms-opencompass pulls numpy<2.0, downgrading numpy from 2.x to 1.26.4. Force reinstall numpy>=2.0 after pip install .[eval] to restore it. --- docker/Dockerfile.ascend | 4 +++- docker/Dockerfile.ubuntu | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.ascend b/docker/Dockerfile.ascend index 1669a9e6..565f0408 100644 --- a/docker/Dockerfile.ascend +++ b/docker/Dockerfile.ascend @@ -116,7 +116,9 @@ RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \ pip install --no-cache-dir -U funasr scikit-learn && \ pip install --no-cache-dir -U qwen_vl_utils qwen_omni_utils librosa 'timm>=0.9.0' transformers accelerate peft trl safetensors && \ cd /ms-swift && pip install --no-cache-dir -e '.[llm]' && \ - pip install --no-cache-dir -e '.[eval]' && pip install evalscope -U --no-dependencies && pip install ms-agent -U --no-dependencies && \ + pip install --no-cache-dir -e '.[eval]' && pip install evalscope -U --no-dependencies && \ + pip install --no-cache-dir "numpy>=2.0" --force-reinstall --no-deps && \ + pip install ms-agent -U --no-dependencies && \ cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b {modelscope_branch} --single-branch https://github.com/modelscope/modelscope.git && \ cd modelscope && pip install . -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \ cd / && rm -fr /tmp/modelscope && \ diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index 43970238..2493f0e7 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -52,7 +52,9 @@ RUN bash /tmp/install.sh {version_args} && \ pip install --no-cache-dir -U qwen_vl_utils qwen_omni_utils librosa timm transformers accelerate peft trl safetensors && \ cd /tmp && GIT_LFS_SKIP_SMUDGE=1 git clone -b {swift_branch} --single-branch https://github.com/modelscope/ms-swift.git && \ cd ms-swift && pip install .[llm] && \ - pip install .[eval] && pip install evalscope -U --no-dependencies && pip install ms-agent -U --no-dependencies && \ + pip install .[eval] && pip install evalscope -U --no-dependencies && \ + pip install --no-cache-dir "numpy>=2.0" --force-reinstall --no-deps && \ + 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 && \ cd modelscope && pip install . -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html && \