Skip to content

Commit 0d4bc03

Browse files
authored
Fix wheel glibc version incompatibility (#1582)
### What this PR does / why we need it? - Fixes #1533 ### How was this patch tested? 1. Run the image ``` docker run \ --name cann_container \ --device /dev/davinci6 \ --device /dev/davinci_manager \ --device /dev/devmm_svm \ --device /dev/hisi_hdc \ -v /usr/local/dcmi:/usr/local/dcmi \ -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \ -v /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/ \ -v /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info \ -v /etc/ascend_install.info:/etc/ascend_install.info \ -it quay.io/ascend/cann:8.1.rc1-910b-openeuler22.03-py3.11 bash ``` 2. Install package torch=2.5.1 torch-npu=2.5.1.post1.dev20250619 vllm=0.9.1 vllm-ascend=vllm_ascend-0.1.dev1+g02ac443-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Artifact download URL: https://github.com/vllm-project/vllm-ascend/actions/runs/16039661265/artifacts/3454481370 3. Test offline script ``` from vllm import LLM, SamplingParams import os os.environ["VLLM_USE_V1"] = "1" prompts = [ "Hello, my name is", ] llm = LLM(model="Qwen3/Qwen3-1.7B") outputs = llm.generate(prompts) for output in outputs: prompt = output.prompt generated_text = output.outputs[0].text print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}") ``` 4. Results ![result](https://github.com/user-attachments/assets/20f9d923-00ce-4a2d-8598-9b216045705d) - vLLM version: v0.9.2 - vLLM main: vllm-project/vllm@b942c09 --------- Signed-off-by: Icey <1790571317@qq.com>
1 parent e4e9ea0 commit 0d4bc03

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

.github/Dockerfile.buildwheel

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@
1515
# This file is a part of the vllm-ascend project.
1616
#
1717
ARG PY_VERSION=3.10
18-
FROM quay.io/ascend/cann:8.0.0-910b-ubuntu22.04-py${PY_VERSION}
18+
FROM quay.io/ascend/manylinux:8.0.0-910b-manylinux_2_28-py${PY_VERSION}
1919

2020
ARG COMPILE_CUSTOM_KERNELS=1
2121

2222
# Define environments
2323
ENV DEBIAN_FRONTEND=noninteractive
2424
ENV COMPILE_CUSTOM_KERNELS=${COMPILE_CUSTOM_KERNELS}
25-
RUN apt-get update -y && \
26-
apt-get install -y python3-pip git vim wget net-tools gcc g++ cmake libnuma-dev && \
27-
rm -rf /var/cache/apt/* && \
28-
rm -rf /var/lib/apt/lists/*
25+
RUN yum update -y && \
26+
yum install -y python3-pip git vim wget net-tools gcc gcc-c++ make cmake numactl-devel && \
27+
rm -rf /var/cache/yum
2928

3029
WORKDIR /workspace
3130

@@ -41,8 +40,6 @@ RUN source /usr/local/Ascend/ascend-toolkit/set_env.sh && \
4140
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Ascend/ascend-toolkit/latest/`uname -i`-linux/devlib && \
4241
cd vllm-ascend && \
4342
python3 setup.py bdist_wheel && \
44-
ls -l dist && \
45-
for f in dist/*.whl; do mv "$f" "$(echo "$f" | sed -e 's/-linux_x86_64\.whl$/-manylinux1_x86_64.whl/' -e 's/-linux_aarch64\.whl$/-manylinux2014_aarch64.whl/')"; done && \
46-
ls -l dist
43+
ls -l dist
4744

4845
CMD ["/bin/bash"]

.github/workflows/release_whl.yml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,51 @@ jobs:
7878
--build-arg PY_VERSION=${{ matrix.python-version }} \
7979
-t wheel:v1 .
8080
docker run --rm \
81+
-u $(id -u):$(id -g) \
8182
-v $(pwd):/outpwd \
8283
wheel:v1 \
8384
bash -c "cp -r /workspace/vllm-ascend/dist /outpwd"
8485
ls dist
85-
86-
- name: Archive wheel
87-
uses: actions/upload-artifact@v4
88-
with:
89-
name: vllm-ascend-${{ matrix.os }}-py${{ matrix.python-version }}-wheel
90-
path: dist/*
9186
9287
- name: Set up Python ${{ matrix.python-version }}
9388
if: startsWith(github.ref, 'refs/tags/')
9489
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
9590
with:
9691
python-version: ${{ matrix.python-version }}
92+
93+
- name: Repair wheels with auditwheel
94+
run: |
95+
python3 -m pip install auditwheel
96+
python3 -m pip install patchelf
97+
mkdir -p dist/repaired
98+
for whl in dist/*.whl; do
99+
auditwheel repair "$whl" -w dist/repaired/ \
100+
--exclude libplatform.so \
101+
--exclude libregister.so \
102+
--exclude libge_common_base.so \
103+
--exclude libc10.so \
104+
--exclude libc_sec.so \
105+
--exclude "libascend*.so" \
106+
--exclude "libtorch*.so"
107+
done
108+
rm -f dist/*.whl
109+
mv dist/repaired/*.whl dist/
110+
rmdir dist/repaired
111+
ls dist
112+
113+
- name: Verify automatic platform tags
114+
run: |
115+
cd dist
116+
for wheel in *.whl; do
117+
echo "verification file: $wheel"
118+
auditwheel show "$wheel"
119+
done
120+
121+
- name: Archive wheel
122+
uses: actions/upload-artifact@v4
123+
with:
124+
name: vllm-ascend-${{ matrix.os }}-py${{ matrix.python-version }}-wheel
125+
path: dist/*
97126

98127
- name: Release
99128
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)