diff --git a/.dev_scripts/ci_container_test.sh b/.dev_scripts/ci_container_test.sh index 4323be1899..b41978d68c 100644 --- a/.dev_scripts/ci_container_test.sh +++ b/.dev_scripts/ci_container_test.sh @@ -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 -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 @@ -20,8 +20,8 @@ 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 install -r requirements/framework.txt -U + pip install decord einops -U pip uninstall autoawq -y pip install optimum pip install diffusers @@ -30,7 +30,7 @@ if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then # test with install pip install . - pip install auto_gptq bitsandbytes deepspeed -U -i https://mirrors.aliyun.com/pypi/simple/ + pip install auto_gptq bitsandbytes deepspeed -U else echo "Running case in release image, run case directly!" fi diff --git a/.github/workflows/citest_npu.yaml b/.github/workflows/citest_npu.yaml index eb30bcc2c2..e543bd574a 100644 --- a/.github/workflows/citest_npu.yaml +++ b/.github/workflows/citest_npu.yaml @@ -51,9 +51,17 @@ jobs: pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }} + + - name: Cache pip packages + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ hashFiles('requirements/framework.txt', 'requirements/tests.txt') }} + restore-keys: ${{ runner.os }}-${{ runner.arch }}-pip- + - name: Get changed files id: changed-files run: | diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6ff84517d8..be70952354 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,11 +10,18 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10' + cache: pip + - name: Cache pre-commit environments + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: pre-commit-${{ runner.os }}- - name: Install pre-commit hook run: | pip install pre-commit