main
sh 30 lines 1.07 KB
Raw
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: Apache-2.0
3 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
4 #
5 # Build the macOS arm64 CPU wheel natively on a macOS agent (the `macmini`
6 # queue) into artifacts/dist/ for upload-nightly-wheels.sh.
7
8 set -euo pipefail
9
10 # The macmini queue uses persistent checkouts, so refresh tags for setuptools-scm.
11 git fetch --tags --force origin
12
13 # upload-nightly-wheels.sh expects exactly one wheel.
14 rm -rf artifacts/dist
15 mkdir -p artifacts/dist
16
17 export VLLM_TARGET_DEVICE=cpu
18 export VLLM_REQUIRE_RUST_FRONTEND=1
19 export MACOSX_DEPLOYMENT_TARGET=11.0
20 # uv's CPython is universal2; force an arm64-only build and tag so the wheel
21 # isn't mislabelled universal2 and installed on Intel Macs where import fails.
22 export ARCHFLAGS="-arch arm64"
23 export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64"
24 export CMAKE_BUILD_PARALLEL_LEVEL="${CMAKE_BUILD_PARALLEL_LEVEL:-4}"
25
26 uv venv --python 3.12
27 uv pip install -r requirements/build/cpu.txt --index-strategy unsafe-best-match
28 uv build --wheel --no-build-isolation -o artifacts/dist
29
30 ls -l artifacts/dist/*.whl