File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11if [ " $MODELSCOPE_SDK_DEBUG " == " True" ]; then
2- # pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
3- pip install -r requirements/tests.txt -i https://mirrors.aliyun.com/pypi/simple/
2+ pip install uv
3+ uv pip install -r requirements/tests.txt
44 git config --global --add safe.directory /ms-swift
55 git config --global user.email tmp
66 git config --global user.name tmp.com
@@ -20,17 +20,17 @@ if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then
2020 fi
2121 fi
2222
23- pip install -r requirements/framework.txt -U -i https://mirrors.aliyun.com/pypi/simple/
24- pip install decord einops -U -i https://mirrors.aliyun.com/pypi/simple/
23+ uv pip install -r requirements/framework.txt -U
24+ uv pip install decord einops -U
2525 pip uninstall autoawq -y
26- pip install optimum
27- pip install diffusers
28- pip install " transformers<5.0"
26+ uv pip install optimum
27+ uv pip install diffusers
28+ uv pip install " transformers<5.0"
2929 # pip install autoawq -U --no-deps
3030
3131 # test with install
32- pip install .
33- pip install auto_gptq bitsandbytes deepspeed -U -i https://mirrors.aliyun.com/pypi/simple/
32+ uv pip install .
33+ uv pip install auto_gptq bitsandbytes deepspeed -U
3434else
3535 echo " Running case in release image, run case directly!"
3636fi
Original file line number Diff line number Diff line change 4949 -e MODEL_TAG_URL=$MODEL_TAG_URL \
5050 -e MODELSCOPE_API_TOKEN=$MODELSCOPE_API_TOKEN \
5151 -e PR_CHANGED_FILES=$PR_CHANGED_FILES \
52+ -e UV_INDEX_URL=$UV_INDEX_URL \
53+ -e UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL \
54+ -e UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY \
55+ -e UV_NO_CACHE=$UV_NO_CACHE \
56+ -e UV_SYSTEM_PYTHON=$UV_SYSTEM_PYTHON \
5257 --workdir=$CODE_DIR_IN_CONTAINER \
5358 ${IMAGE_NAME} :${IMAGE_VERSION} \
5459 $CI_COMMAND
7378 -e MODEL_TAG_URL=$MODEL_TAG_URL \
7479 -e MODELSCOPE_API_TOKEN=$MODELSCOPE_API_TOKEN \
7580 -e PR_CHANGED_FILES=$PR_CHANGED_FILES \
81+ -e UV_INDEX_URL=$UV_INDEX_URL \
82+ -e UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL \
83+ -e UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY \
84+ -e UV_NO_CACHE=$UV_NO_CACHE \
85+ -e UV_SYSTEM_PYTHON=$UV_SYSTEM_PYTHON \
7686 --workdir=$CODE_DIR_IN_CONTAINER \
7787 ${IMAGE_NAME} :${IMAGE_VERSION} \
7888 $CI_COMMAND
Original file line number Diff line number Diff line change 7171 run : git lfs checkout
7272 - name : Run unittest
7373 shell : bash
74+ env :
75+ UV_INDEX_URL : " http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple"
76+ UV_EXTRA_INDEX_URL : " https://mirrors.huaweicloud.com/ascend/repos/pypi"
77+ UV_INDEX_STRATEGY : " unsafe-best-match"
78+ UV_NO_CACHE : 1
79+ UV_SYSTEM_PYTHON : 1
7480 run : |
7581 set -e
7682 source /mnt/modelscope/ci_env.sh
Original file line number Diff line number Diff line change @@ -43,12 +43,17 @@ jobs:
4343 timeout-minutes : 240
4444 container :
4545 image : ' ascendai/cann:8.3.rc2-910b-ubuntu22.04-py3.11'
46+ env :
47+ UV_INDEX_URL : " http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple"
48+ UV_EXTRA_INDEX_URL : " https://mirrors.huaweicloud.com/ascend/repos/pypi"
49+ UV_INDEX_STRATEGY : " unsafe-best-match"
50+ UV_NO_CACHE : 1
51+ UV_SYSTEM_PYTHON : 1
4652 steps :
4753 - name : Config mirrors
4854 run : |
4955 sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list
50- pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
51- pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
56+ pip install uv
5257
5358 - name : Checkout
5459 uses : actions/checkout@v3
You can’t perform that action at this time.
0 commit comments