This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
Build vLLM wheel #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build vLLM wheel | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.ref }} | |
repository: ${{ github.event.inputs.repository }} | |
- name: Resolve commit hash | |
id: commit-hash | |
run: | | |
echo "COMMIT_HASH=$(git rev-parse HEAD)" | tee $GITHUB_OUTPUT | |
- name: Resolve SOURCE_DATE_EPOCH | |
id: source-date-epoch | |
run: | | |
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" | tee $GITHUB_OUTPUT | |
- name: Apply patches | |
run: | | |
set -e | |
# List of patches | |
patches=( | |
"https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/patches/vllm/0000-enable-support-for-pascal-gpus.patch" | |
"https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/patches/vllm/1000-set-torch-cuda-arch-list.patch" | |
"https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/patches/vllm/9000-add-vllm-command-that-launches-api-server.patch" | |
) | |
# Apply patches | |
for patch in ${patches[@]}; do | |
echo "Applying patch $patch" | |
curl "$patch" | patch -p1 | |
done | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.18.0 | |
env: | |
CIBW_BUILD: cp${{ matrix.python_version }}-manylinux_x86_64 | |
CIBW_ENVIRONMENT: CMAKE_BUILD_TYPE=Release VLLM_INSTALL_PUNICA_KERNELS=0 | |
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: ghcr.io/sasha0552/manylinux2014_x86_64-cuda | |
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/sasha0552/manylinux2014_x86_64-cuda | |
CIBW_REPAIR_WHEEL_COMMAND: ~ | |
SOURCE_DATE_EPOCH: ${{ steps.source-date-epoch.outputs.SOURCE_DATE_EPOCH }} | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
body: https://github.com/${{ github.event.inputs.repository }}/commit/${{ steps.commit-hash.outputs.COMMIT_HASH }} | |
files: wheelhouse/*.whl | |
prerelease: true | |
tag_name: ${{ github.event.inputs.tag_name }} | |
strategy: | |
matrix: | |
python_version: [38, 39, 310, 311] | |
on: | |
workflow_dispatch: | |
inputs: | |
repository: | |
default: vllm-project/vllm | |
description: Source repository | |
required: true | |
type: string | |
ref: | |
default: main | |
description: Source ref | |
required: true | |
type: string | |
tag_name: | |
description: Target tag | |
required: true | |
type: string |