diff --git a/requirements/build/tpu.txt b/requirements/build/tpu.txt new file mode 100644 index 00000000000..cb0a541fe1d --- /dev/null +++ b/requirements/build/tpu.txt @@ -0,0 +1,7 @@ +--extra-index-url https://download.pytorch.org/whl/cpu +cmake>=3.26.1 +ninja +setuptools>=77.0.3,<81.0.0 +setuptools-scm>=8 +torch==2.11.0+cpu +wheel diff --git a/tools/vllm-tpu/build.sh b/tools/vllm-tpu/build.sh index aa46a5298bf..226439ce58f 100755 --- a/tools/vllm-tpu/build.sh +++ b/tools/vllm-tpu/build.sh @@ -79,12 +79,15 @@ trap cleanup EXIT HUP INT QUIT PIPE TERM # Register cleanup function to run on s echo "Updating pyproject.toml completed. Proceeding with build..." +echo "Install dependencies for no-isolation build" +pip install -r "$VLLM_DIR/requirements/build/tpu.txt" + echo "Building wheel for TPU..." rm -rf dist/ mkdir -p dist/ # User confirmed to use 'python -m build' directly -if ! VLLM_TARGET_DEVICE=tpu python -m build; then +if ! VLLM_TARGET_DEVICE=tpu python -m build --no-isolation; then echo "Error: Python build command failed. Check if 'python -m build' works and the 'build' module is installed." exit 1 fi