[TEST][DOC] Fix doctest and add system package installation (#1375)
### What this PR does / why we need it? - Fix [doctest](https://github.com/vllm-project/vllm-ascend/actions/workflows/vllm_ascend_doctest.yaml?query=event%3Aschedule) - add system package installation - Add doc for run doctests - Cleanup all extra steps in .github/workflows/vllm_ascend_doctest.yaml - Change schedule job from 4 ---> 12 hours ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - doctest CI passed - Local test with `/vllm-workspace/vllm-ascend/tests/e2e/run_doctests.sh`. Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
This commit is contained in:
@@ -16,6 +16,16 @@
|
||||
# limitations under the License.
|
||||
# This file is a part of the vllm-ascend project.
|
||||
#
|
||||
function install_system_packages() {
|
||||
if command -v apt-get >/dev/null; then
|
||||
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
|
||||
apt-get update -y && apt install -y curl
|
||||
elif command -v yum >/dev/null; then
|
||||
yum update -y && yum install -y curl
|
||||
else
|
||||
echo "Unknown package manager. Please install gcc, g++, numactl-devel, git, curl, and jq manually."
|
||||
fi
|
||||
}
|
||||
|
||||
function simple_test() {
|
||||
# Do real import test
|
||||
@@ -28,6 +38,7 @@ function quickstart_offline_test() {
|
||||
}
|
||||
|
||||
function quickstart_online_test() {
|
||||
install_system_packages
|
||||
vllm serve Qwen/Qwen2.5-0.5B-Instruct &
|
||||
wait_url_ready "vllm serve" "localhost:8000/v1/models"
|
||||
# Do real curl test
|
||||
|
||||
@@ -18,14 +18,34 @@
|
||||
#
|
||||
trap clean_venv EXIT
|
||||
|
||||
function install_system_packages() {
|
||||
if command -v apt-get >/dev/null; then
|
||||
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
|
||||
apt-get update -y && apt-get install -y gcc g++ cmake libnuma-dev wget git curl jq
|
||||
elif command -v yum >/dev/null; then
|
||||
yum update -y && yum install -y gcc g++ cmake numactl-devel wget git curl jq
|
||||
else
|
||||
echo "Unknown package manager. Please install curl manually."
|
||||
fi
|
||||
}
|
||||
|
||||
function config_pip_mirror() {
|
||||
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
|
||||
}
|
||||
|
||||
function install_binary_test() {
|
||||
|
||||
install_system_packages
|
||||
config_pip_mirror
|
||||
create_vllm_venv
|
||||
|
||||
PIP_VLLM_VERSION=$(get_version pip_vllm_version)
|
||||
PIP_VLLM_ASCEND_VERSION=$(get_version pip_vllm_ascend_version)
|
||||
_info "====> Install vllm==${PIP_VLLM_VERSION} and vllm-ascend ${PIP_VLLM_ASCEND_VERSION}"
|
||||
|
||||
# Setup extra-index-url for x86 & torch_npu dev version
|
||||
pip config set global.extra-index-url "https://download.pytorch.org/whl/cpu/ https://mirrors.huaweicloud.com/ascend/repos/pypi"
|
||||
|
||||
pip install vllm=="$(get_version pip_vllm_version)"
|
||||
pip install vllm-ascend=="$(get_version pip_vllm_ascend_version)"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user