### What this PR does / why we need it?
This patch enables the doc build for vllm-ascend
- Add sphinx build for vllm-ascend
- Enable readthedocs for vllm-ascend
- Fix CI:
- exclude vllm-empty/tests/mistral_tool_use to skip `You need to agree
to share your contact information to access this model` which introduce
in
314cfade02
- Install test req to fix
https://github.com/vllm-project/vllm-ascend/actions/runs/13304112758/job/37151690770:
```
vllm-empty/tests/mistral_tool_use/conftest.py:4: in <module>
import pytest_asyncio
E ModuleNotFoundError: No module named 'pytest_asyncio'
```
- exclude docs PR
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
1. test locally:
```bash
# Install dependencies.
pip install -r requirements-docs.txt
# Build the docs and preview
make clean; make html; python -m http.server -d build/html/
```
Launch browser and open http://localhost:8000/.
2. CI passed with preview:
https://vllm-ascend--55.org.readthedocs.build/en/55/
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
109 lines
3.1 KiB
YAML
109 lines
3.1 KiB
YAML
#
|
|
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
|
|
# This file is a part of the vllm-ascend project.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
name: 'e2e test'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- '*.txt'
|
|
- '**/*.py'
|
|
- '.github/workflows/vllm_ascend_test.yaml'
|
|
- '!docs/**'
|
|
pull_request:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- '*.txt'
|
|
- '**/*.py'
|
|
- '.github/workflows/vllm_ascend_test.yaml'
|
|
- '!docs/**'
|
|
|
|
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
|
|
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
|
|
# It's used to activate ascend-toolkit environment variables.
|
|
defaults:
|
|
run:
|
|
shell: bash -el {0}
|
|
|
|
jobs:
|
|
test:
|
|
name: vLLM Ascend test (self-host)
|
|
runs-on: ascend-arm64 # actionlint-ignore: runner-label
|
|
|
|
container:
|
|
image: quay.io/ascend/cann:8.0.rc3.beta1-910b-ubuntu22.04-py3.10
|
|
volumes:
|
|
- /usr/local/dcmi:/usr/local/dcmi
|
|
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
|
|
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
|
|
# Use self-host cache speed up pip and model download
|
|
- /home/action/actions-runner/_work/cache:/github/home/.cache/
|
|
options: >-
|
|
--device /dev/davinci6
|
|
--device /dev/davinci_manager
|
|
--device /dev/devmm_svm
|
|
--device /dev/hisi_hdc
|
|
env:
|
|
HF_ENDPOINT: https://hf-mirror.com
|
|
steps:
|
|
- name: Check npu driver
|
|
run: |
|
|
npu-smi info
|
|
|
|
- name: Config mirrors
|
|
run: |
|
|
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
|
|
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
|
|
|
|
- name: Checkout vllm-project/vllm-ascend repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt-get update -y
|
|
apt-get -y install `cat packages.txt`
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements-dev.txt
|
|
|
|
- name: Checkout vllm-project/vllm repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: vllm-project/vllm
|
|
path: ./vllm-empty
|
|
|
|
- name: Install vllm-project/vllm from source
|
|
working-directory: ./vllm-empty
|
|
run: |
|
|
VLLM_TARGET_DEVICE=empty pip install -e .
|
|
|
|
- name: Install vllm-project/vllm-ascend
|
|
run: |
|
|
pip install -e .
|
|
|
|
- name: Run vllm-project/vllm-ascend test
|
|
run: |
|
|
pytest -sv tests
|
|
|
|
- name: Run vllm-project/vllm test
|
|
run: |
|
|
pytest -sv
|