fix: reuse legacy hub cache and use build-time PyPI fallback

Reuse flat/hub legacy caches in download paths. For docker builds, pass
PIP_EXTRA_INDEX_URL via ARG and RUN export so PyPI is available during
install without persisting it as an image ENV default.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
suluyan
2026-07-21 20:01:05 +08:00
parent 9ab427b29a
commit cfe1f4190c
9 changed files with 263 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
pip install -r requirements/tests.txt
PIP_EXTRA_INDEX_URL=https://pypi.org/simple pip install -r requirements/tests.txt
git config --global --add safe.directory /Maas-lib
git config --global user.email tmp
git config --global user.name tmp.com