feat: [CI] Introduce uv to accelerate pip install (#7127)
### What this PR does / why we need it?
Integrates uv: Significantly accelerates pip install execution and
resolves concurrency issues caused by traditional pip caching
mechanisms.
Why pip install uc-manager is explicitly added:
This project depends on uc-manager. However, installing it via uv pip
install uc-manager currently fails due to a known issue. An issue has
already been filed with the upstream uv repository to address this.
Consequently, we explicitly invoke pip install uc-manager as a temporary
workaround to ensure the build succeeds.
https://github.com/ModelEngine-Group/unified-cache-management/issues/736
Why use UV_SYSTEM_PYTHON: 1:
No virtual environment has been created yet; this configuration has the
same effect as directly using `pip install`.
- vLLM version: v0.16.0
- vLLM main:
15d76f74e2
Signed-off-by: tfhddd <2272751277@qq.com>
This commit is contained in:
13
.github/workflows/_e2e_nightly_single_node.yaml
vendored
13
.github/workflows/_e2e_nightly_single_node.yaml
vendored
@@ -71,11 +71,17 @@ jobs:
|
||||
env:
|
||||
HF_HUB_OFFLINE: 1
|
||||
VLLM_USE_MODELSCOPE: True
|
||||
UV_INDEX_URL: http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
|
||||
UV_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
UV_INDEX_STRATEGY: unsafe-best-match
|
||||
UV_NO_CACHE: 1
|
||||
UV_SYSTEM_PYTHON: 1
|
||||
steps:
|
||||
- name: Check npu and CANN info
|
||||
run: |
|
||||
npu-smi info
|
||||
cat /usr/local/Ascend/ascend-toolkit/latest/"$(uname -i)"-linux/ascend_toolkit_install.info
|
||||
pip install uv
|
||||
|
||||
- name: uninstall vlm vllm-ascend and remove code (if pr test)
|
||||
if: ${{ inputs.is_pr_test }}
|
||||
@@ -110,7 +116,7 @@ jobs:
|
||||
if: ${{ inputs.is_pr_test }}
|
||||
working-directory: /vllm-workspace/vllm
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
if: ${{ inputs.is_pr_test }}
|
||||
@@ -118,8 +124,9 @@ jobs:
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
|
||||
- name: Install aisbench
|
||||
if: ${{ inputs.is_pr_test }}
|
||||
|
||||
@@ -67,6 +67,11 @@ jobs:
|
||||
env:
|
||||
VLLM_USE_MODELSCOPE: True
|
||||
GHA_VLLM_ASCEND_VERSION: ${{ inputs.vllm-ascend }}
|
||||
UV_INDEX_URL: http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
|
||||
UV_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
UV_INDEX_STRATEGY: unsafe-best-match
|
||||
UV_NO_CACHE: 1
|
||||
UV_SYSTEM_PYTHON: 1
|
||||
steps:
|
||||
- name: Check npu and CANN info
|
||||
run: |
|
||||
@@ -91,6 +96,7 @@ jobs:
|
||||
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 20
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 20
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -102,14 +108,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
|
||||
- name: Install tensorflow (for Molmo-7B-D-0924)
|
||||
if: ${{ inputs.runner == 'linux-aarch64-a2b3-1' && contains(inputs.model_list, 'Molmo-7B-D-0924') }}
|
||||
|
||||
62
.github/workflows/_e2e_test.yaml
vendored
62
.github/workflows/_e2e_test.yaml
vendored
@@ -19,6 +19,12 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
env:
|
||||
UV_INDEX_URL: http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
|
||||
UV_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
UV_INDEX_STRATEGY: unsafe-best-match
|
||||
UV_NO_CACHE: 1
|
||||
UV_SYSTEM_PYTHON: 1
|
||||
|
||||
jobs:
|
||||
e2e-light:
|
||||
@@ -58,6 +64,7 @@ jobs:
|
||||
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 20
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 20
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -70,14 +77,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
|
||||
- name: Run vllm-project/vllm-ascend test
|
||||
env:
|
||||
@@ -147,6 +155,7 @@ jobs:
|
||||
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 20
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 20
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -159,14 +168,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
- name: Run e2e test
|
||||
env:
|
||||
VLLM_WORKER_MULTIPROC_METHOD: spawn
|
||||
@@ -233,6 +243,7 @@ jobs:
|
||||
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 20
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 20
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -245,14 +256,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
- name: Run vllm-project/vllm-ascend test (light)
|
||||
env:
|
||||
VLLM_WORKER_MULTIPROC_METHOD: spawn
|
||||
@@ -319,6 +331,7 @@ jobs:
|
||||
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 20
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 20
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -331,14 +344,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
- name: Run vllm-project/vllm-ascend test (full)
|
||||
env:
|
||||
VLLM_WORKER_MULTIPROC_METHOD: spawn
|
||||
@@ -412,6 +426,7 @@ jobs:
|
||||
|
||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 20
|
||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 20
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -424,14 +439,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
|
||||
- name: Run vllm-project/vllm-ascend test for V1 Engine
|
||||
env:
|
||||
@@ -491,6 +507,7 @@ jobs:
|
||||
run: |
|
||||
apt-get -y install `cat packages.txt`
|
||||
apt-get -y install gcc g++ cmake libnuma-dev
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -503,14 +520,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
|
||||
- name: Run vllm-project/vllm-ascend test
|
||||
env:
|
||||
@@ -550,6 +568,7 @@ jobs:
|
||||
run: |
|
||||
apt-get -y install `cat packages.txt`
|
||||
apt-get -y install gcc g++ cmake libnuma-dev
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -562,14 +581,15 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty pip install -e .
|
||||
VLLM_TARGET_DEVICE=empty uv pip install -e .
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
env:
|
||||
PIP_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
run: |
|
||||
pip install -r requirements-dev.txt
|
||||
pip install -v -e .
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt
|
||||
uv pip install -v -e .
|
||||
|
||||
- name: Run vllm-project/vllm-ascend test
|
||||
env:
|
||||
|
||||
10
.github/workflows/_pre_commit.yml
vendored
10
.github/workflows/_pre_commit.yml
vendored
@@ -50,9 +50,17 @@ jobs:
|
||||
|
||||
- name: Install vllm-ascend dev (conditional)
|
||||
if: steps.filter.outputs.lint_tracker == 'true'
|
||||
env:
|
||||
UV_INDEX_URL: http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
|
||||
UV_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
UV_INDEX_STRATEGY: unsafe-best-match
|
||||
UV_NO_CACHE: 1
|
||||
UV_SYSTEM_PYTHON: 1
|
||||
run: |
|
||||
pip install uv
|
||||
git config --global --add safe.directory /__w/vllm-ascend/vllm-ascend
|
||||
pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
pip install uc-manager
|
||||
uv pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
|
||||
- name: Run pre-commit
|
||||
env:
|
||||
|
||||
17
.github/workflows/_unit_test.yaml
vendored
17
.github/workflows/_unit_test.yaml
vendored
@@ -28,6 +28,12 @@ jobs:
|
||||
SOC_VERSION: ascend910b1
|
||||
MAX_JOBS: 4
|
||||
COMPILE_CUSTOM_KERNELS: 0
|
||||
UV_INDEX_URL: http://cache-service.nginx-pypi-cache.svc.cluster.local/pypi/simple
|
||||
UV_EXTRA_INDEX_URL: https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
UV_INDEX_STRATEGY: unsafe-best-match
|
||||
UV_NO_CACHE: 1
|
||||
UV_SYSTEM_PYTHON: 1
|
||||
UV_PYTHON: python3
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
@@ -36,6 +42,7 @@ jobs:
|
||||
pip config set global.trusted-host cache-service.nginx-pypi-cache.svc.cluster.local
|
||||
apt-get update -y
|
||||
apt-get install -y python3-pip git vim wget net-tools gcc g++ cmake libnuma-dev curl gnupg2
|
||||
pip install uv
|
||||
|
||||
- name: Checkout vllm-project/vllm repo
|
||||
uses: actions/checkout@v6
|
||||
@@ -47,18 +54,18 @@ jobs:
|
||||
- name: Install vllm-project/vllm from source
|
||||
working-directory: ./vllm-empty
|
||||
run: |
|
||||
VLLM_TARGET_DEVICE=empty python3 -m pip install . --extra-index https://download.pytorch.org/whl/cpu/
|
||||
python3 -m pip uninstall -y triton
|
||||
VLLM_TARGET_DEVICE=empty uv pip install . --extra-index-url https://download.pytorch.org/whl/cpu/
|
||||
uv pip uninstall triton
|
||||
|
||||
- name: Checkout vllm-project/vllm-ascend repo
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install vllm-project/vllm-ascend
|
||||
run: |
|
||||
export PIP_EXTRA_INDEX_URL=https://mirrors.huaweicloud.com/ascend/repos/pypi
|
||||
pip install uc-manager
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib
|
||||
python3 -m pip install -v . --extra-index https://download.pytorch.org/whl/cpu/
|
||||
python3 -m pip install -r requirements-dev.txt --extra-index https://download.pytorch.org/whl/cpu/
|
||||
uv pip install -v . --extra-index-url https://download.pytorch.org/whl/cpu/
|
||||
uv pip install -r requirements-dev.txt --extra-index-url https://download.pytorch.org/whl/cpu/
|
||||
|
||||
- name: Run unit test
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user