Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .dev_scripts/ci_container_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then
# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -r requirements/tests.txt -i https://mirrors.aliyun.com/pypi/simple/
pip install uv -i https://mirrors.aliyun.com/pypi/simple/
uv pip install -r requirements/tests.txt
git config --global --add safe.directory /ms-swift
git config --global user.email tmp
git config --global user.name tmp.com
Expand All @@ -20,17 +20,20 @@ if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then
fi
fi

pip install -r requirements/framework.txt -U -i https://mirrors.aliyun.com/pypi/simple/
pip install decord einops -U -i https://mirrors.aliyun.com/pypi/simple/
pip uninstall autoawq -y
pip install optimum
pip install diffusers
pip install "transformers<5.0" "peft<0.19"
uv pip install -r requirements/framework.txt -U
uv pip install decord einops -U
Comment thread
KadenZhang3321 marked this conversation as resolved.
uv pip uninstall autoawq
uv pip install optimum
uv pip install diffusers
uv pip install "transformers<5.0" "peft<0.19"
Comment thread
KadenZhang3321 marked this conversation as resolved.
# pip install autoawq -U --no-deps

# test with install
pip install .
pip install auto_gptq bitsandbytes deepspeed -U -i https://mirrors.aliyun.com/pypi/simple/
uv pip install .
uv pip install auto_gptq bitsandbytes deepspeed -U
Comment thread
KadenZhang3321 marked this conversation as resolved.
if [ -f requirements/npu.txt ]; then
uv pip install -r requirements/npu.txt
fi
else
echo "Running case in release image, run case directly!"
fi
Expand Down
14 changes: 14 additions & 0 deletions .dev_scripts/dockerci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ do
-e MODEL_TAG_URL=$MODEL_TAG_URL \
-e MODELSCOPE_API_TOKEN=$MODELSCOPE_API_TOKEN \
-e PR_CHANGED_FILES=$PR_CHANGED_FILES \
-e UV_INDEX_URL=${UV_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple/} \
-e UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL \
-e UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY \
-e UV_NO_CACHE=$UV_NO_CACHE \
-e UV_INSECURE_HOST=$UV_INSECURE_HOST \
-e UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT:-120} \
-e UV_SYSTEM_PYTHON=${UV_SYSTEM_PYTHON:-1} \
--workdir=$CODE_DIR_IN_CONTAINER \
${IMAGE_NAME}:${IMAGE_VERSION} \
$CI_COMMAND
Expand All @@ -73,6 +80,13 @@ do
-e MODEL_TAG_URL=$MODEL_TAG_URL \
-e MODELSCOPE_API_TOKEN=$MODELSCOPE_API_TOKEN \
-e PR_CHANGED_FILES=$PR_CHANGED_FILES \
-e UV_INDEX_URL=${UV_INDEX_URL:-https://mirrors.aliyun.com/pypi/simple/} \
-e UV_EXTRA_INDEX_URL=$UV_EXTRA_INDEX_URL \
-e UV_INDEX_STRATEGY=$UV_INDEX_STRATEGY \
-e UV_NO_CACHE=$UV_NO_CACHE \
-e UV_INSECURE_HOST=$UV_INSECURE_HOST \
-e UV_HTTP_TIMEOUT=${UV_HTTP_TIMEOUT:-120} \
-e UV_SYSTEM_PYTHON=${UV_SYSTEM_PYTHON:-1} \
--workdir=$CODE_DIR_IN_CONTAINER \
${IMAGE_NAME}:${IMAGE_VERSION} \
$CI_COMMAND
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/citest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ jobs:
run: git lfs checkout
- name: Run unittest
shell: bash
env:
UV_INDEX_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple"
UV_EXTRA_INDEX_URL: "https://repo.huaweicloud.com/ascend/repos/pypi"
UV_INDEX_STRATEGY: "unsafe-best-match"
UV_INSECURE_HOST: "cache-service.nginx-pypi-cache.svc.cluster.local"
UV_HTTP_TIMEOUT: 120
UV_NO_CACHE: 1
UV_SYSTEM_PYTHON: 1
run: |
set -e
source /mnt/modelscope/ci_env.sh
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/citest_npu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,21 @@ jobs:
timeout-minutes: 240
container:
image: 'ascendai/cann:8.3.rc2-910b-ubuntu22.04-py3.11'
env:
UV_INDEX_URL: "http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple"
UV_EXTRA_INDEX_URL: "https://repo.huaweicloud.com/ascend/repos/pypi"
UV_INDEX_STRATEGY: "unsafe-best-match"
UV_INSECURE_HOST: "cache-service.nginx-pypi-cache.svc.cluster.local"
UV_HTTP_TIMEOUT: 120
UV_NO_CACHE: 1
UV_SYSTEM_PYTHON: 1
steps:
- name: Config mirrors
run: |
sed -Ei 's@(ports|archive).ubuntu.com@cache-service.nginx-pypi-cache.svc.cluster.local:8081@g' /etc/apt/sources.list
pip config set global.index-url http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
pip install uv

- name: Checkout
uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions requirements/npu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
decorator
torch==2.7.1
torch-npu==2.7.1.post4
torchaudio==2.7.1
torchvision==0.22.1