From e0b056e443135e98a525bcfd2f59d87f4a7bcc14 Mon Sep 17 00:00:00 2001 From: youkaichao Date: Thu, 21 Aug 2025 23:32:55 +0800 Subject: [PATCH] [ci/build] Fix abi tag for aarch64 (#23329) Signed-off-by: youkaichao --- .buildkite/generate_index.py | 9 +++++++-- .buildkite/scripts/upload-wheels.sh | 15 +++++++++++++-- setup.py | 15 ++++++++++++--- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.buildkite/generate_index.py b/.buildkite/generate_index.py index 6b5a2a9935..bbed80ebe8 100644 --- a/.buildkite/generate_index.py +++ b/.buildkite/generate_index.py @@ -22,11 +22,16 @@ filename = os.path.basename(args.wheel) with open("index.html", "w") as f: print(f"Generated index.html for {args.wheel}") + # sync the abi tag with .buildkite/scripts/upload-wheels.sh if "x86_64" in filename: x86_wheel = filename - arm_wheel = filename.replace("x86_64", "aarch64") + arm_wheel = filename.replace("x86_64", "aarch64").replace( + "manylinux1", "manylinux2014" + ) elif "aarch64" in filename: - x86_wheel = filename.replace("aarch64", "x86_64") + x86_wheel = filename.replace("aarch64", "x86_64").replace( + "manylinux2014", "manylinux1" + ) arm_wheel = filename else: raise ValueError(f"Unsupported wheel: {filename}") diff --git a/.buildkite/scripts/upload-wheels.sh b/.buildkite/scripts/upload-wheels.sh index 037897e53d..745f285c00 100644 --- a/.buildkite/scripts/upload-wheels.sh +++ b/.buildkite/scripts/upload-wheels.sh @@ -14,8 +14,19 @@ fi # Get the single wheel file wheel="${wheel_files[0]}" -# Rename 'linux' to 'manylinux1' in the wheel filename -new_wheel="${wheel/linux/manylinux1}" +# Detect architecture and rename 'linux' to appropriate manylinux version +arch=$(uname -m) +if [[ $arch == "x86_64" ]]; then + manylinux_version="manylinux1" +elif [[ $arch == "aarch64" ]]; then + manylinux_version="manylinux2014" +else + echo "Warning: Unknown architecture $arch, using manylinux1 as default" + manylinux_version="manylinux1" +fi + +# Rename 'linux' to the appropriate manylinux version in the wheel filename +new_wheel="${wheel/linux/$manylinux_version}" mv -- "$wheel" "$new_wheel" wheel="$new_wheel" diff --git a/setup.py b/setup.py index 6a3013de79..fa406b868c 100644 --- a/setup.py +++ b/setup.py @@ -643,16 +643,25 @@ if envs.VLLM_USE_PRECOMPILED: if wheel_location is not None: wheel_url = wheel_location else: + import platform + arch = platform.machine() + if arch == "x86_64": + wheel_tag = "manylinux1_x86_64" + elif arch == "aarch64": + wheel_tag = "manylinux2014_aarch64" + else: + raise ValueError(f"Unsupported architecture: {arch}") base_commit = precompiled_wheel_utils.get_base_commit_in_main_branch() - wheel_url = f"https://wheels.vllm.ai/{base_commit}/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl" + wheel_url = f"https://wheels.vllm.ai/{base_commit}/vllm-1.0.0.dev-cp38-abi3-{wheel_tag}.whl" + nightly_wheel_url = f"https://wheels.vllm.ai/nightly/vllm-1.0.0.dev-cp38-abi3-{wheel_tag}.whl" from urllib.request import urlopen try: with urlopen(wheel_url) as resp: if resp.status != 200: - wheel_url = "https://wheels.vllm.ai/nightly/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl" + wheel_url = nightly_wheel_url except Exception as e: print(f"[warn] Falling back to nightly wheel: {e}") - wheel_url = "https://wheels.vllm.ai/nightly/vllm-1.0.0.dev-cp38-abi3-manylinux1_x86_64.whl" + wheel_url = nightly_wheel_url patch = precompiled_wheel_utils.extract_precompiled_and_patch_package( wheel_url)