Skip to content

Commit 4f293aa

Browse files
committed
[0.9.1] Fix wheel glibc version incompatibility
1 parent 63944db commit 4f293aa

File tree

2 files changed

+39
-13
lines changed

2 files changed

+39
-13
lines changed

.github/Dockerfile.buildwheel

Lines changed: 4 additions & 7 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 && \
4643
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
@@ -71,23 +71,52 @@ jobs:
7171
--build-arg PY_VERSION=${{ matrix.python-version }} \
7272
-t wheel:v1 .
7373
docker run --rm \
74+
-u $(id -u):$(id -g) \
7475
-v $(pwd):/outpwd \
7576
wheel:v1 \
7677
bash -c "cp -r /workspace/vllm-ascend/dist /outpwd"
7778
ls dist
78-
79-
- name: Archive wheel
80-
uses: actions/upload-artifact@v4
81-
with:
82-
name: vllm-ascend-${{ matrix.os }}-py${{ matrix.python-version }}-wheel
83-
path: dist/*
8479
8580
- name: Set up Python ${{ matrix.python-version }}
8681
if: startsWith(github.ref, 'refs/tags/')
8782
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
8883
with:
8984
python-version: ${{ matrix.python-version }}
9085

86+
- name: Repair wheels with auditwheel
87+
run: |
88+
python3 -m pip install auditwheel
89+
python3 -m pip install patchelf
90+
mkdir -p dist/repaired
91+
for whl in dist/*.whl; do
92+
auditwheel repair "$whl" -w dist/repaired/ \
93+
--exclude libplatform.so \
94+
--exclude libregister.so \
95+
--exclude libge_common_base.so \
96+
--exclude libc10.so \
97+
--exclude libc_sec.so \
98+
--exclude "libascend*.so" \
99+
--exclude "libtorch*.so"
100+
done
101+
rm -f dist/*.whl
102+
mv dist/repaired/*.whl dist/
103+
rmdir dist/repaired
104+
ls dist
105+
106+
- name: Verify automatic platform tags
107+
run: |
108+
cd dist
109+
for wheel in *.whl; do
110+
echo "verification file: $wheel"
111+
auditwheel show "$wheel"
112+
done
113+
114+
- name: Archive wheel
115+
uses: actions/upload-artifact@v4
116+
with:
117+
name: vllm-ascend-${{ matrix.os }}-py${{ matrix.python-version }}-wheel
118+
path: dist/*
119+
91120
- name: Release
92121
if: startsWith(github.ref, 'refs/tags/')
93122
run: |

0 commit comments

Comments
 (0)