This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
Build vLLM wheel #17
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 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 | |
# Merge PR #5054 | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git fetch origin pull/5054/head:tokenizer-endpoints | |
git merge --message "Merge branch 'tokenizer-endpoints'" --no-ff tokenizer-endpoints | |
# 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_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: | |
draft: true | |
files: wheelhouse/*.whl | |
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 |