-
Notifications
You must be signed in to change notification settings - Fork 225
141 lines (126 loc) · 4.69 KB
/
aiter-release.yaml
File metadata and controls
141 lines (126 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Aiter Release Package
description: This workflow builds the Aiter Python package as .whl files for Python 3.10 and 3.12, and uploads them as artifacts.
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit hash to build (leave empty to use current commit)'
required: false
build_py310:
description: 'Build with Python 3.10'
type: boolean
default: true
build_py312:
description: 'Build with Python 3.12'
type: boolean
default: true
docker_image_py310:
description: 'Docker image for Python 3.10 build'
required: true
default: 'rocm/7.0-preview:rocm7.0_preview_ubuntu_22.04_vllm_0.10.1_instinct_beta'
docker_image_py312:
description: 'Docker image for Python 3.12 build'
required: true
default: 'rocm/vllm-dev:nightly'
gpu_archs:
description: 'GPU architectures (e.g. gfx942;gfx950)'
required: false
default: 'gfx942;gfx950'
runner:
description: 'Select build host'
required: true
default: 'aiter-k8s-build'
type: choice
options:
- aiter-k8s-build
- aiter-1gpu-runner
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_whl_package:
runs-on: ${{ github.event.inputs.runner }}
strategy:
fail-fast: false
matrix:
include:
- python_version: "3.10"
docker_image: ${{ github.event.inputs.docker_image_py310 }}
build_enabled: ${{ github.event.inputs.build_py310 == 'true' || github.event.inputs.build_py310 == true }}
- python_version: "3.12"
docker_image: ${{ github.event.inputs.docker_image_py312 }}
build_enabled: ${{ github.event.inputs.build_py312 == 'true' || github.event.inputs.build_py312 == true }}
env:
BUILD_DOCKER_IMAGE: ${{ matrix.docker_image }}
PYTHON_VERSION: ${{ matrix.python_version }}
GPU_ARCHS: ${{ github.event.inputs.gpu_archs }}
steps:
- name: Checkout aiter repo
if: ${{ matrix.build_enabled }}
uses: actions/checkout@v4
- name: Checkout to user-specified commit (if provided)
if: ${{ matrix.build_enabled }}
run: |
set -ex
if [ -n "${{ github.event.inputs.commit }}" ]; then
echo "Checking out to commit: ${{ github.event.inputs.commit }}"
git fetch --all
git checkout ${{ github.event.inputs.commit }}
git submodule update --init --recursive --depth 1 --jobs 4
else
echo "No commit input provided, using current commit: $(git rev-parse HEAD)"
fi
- name: Sync submodules
if: ${{ matrix.build_enabled }}
run: |
set -ex
git submodule sync
git submodule update --init --recursive --depth 1 --jobs 4
- name: Run the container
if: ${{ matrix.build_enabled }}
run: |
set -ex
echo "Starting container: aiter_build_${{ matrix.python_version }}"
docker run -dt \
--shm-size=16G \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
--name aiter_build_${{ matrix.python_version }} \
${{ env.BUILD_DOCKER_IMAGE }}
- name: Install Dependencies
if: ${{ matrix.build_enabled }}
run: |
set -e
echo "Install Dependencies"
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
pip install --timeout=60 --retries=10 -r requirements.txt
- name: Install ninja
if: ${{ matrix.build_enabled }}
run: |
set -e
echo "Install ninja"
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
pip install --timeout=60 --retries=10 ninja
- name: Build Aiter
if: ${{ matrix.build_enabled }}
run: |
set -e
echo "Building aiter whl packages for Python ${{ matrix.python_version }}..."
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
bash -c 'PREBUILD_KERNELS=1 GPU_ARCHS="${{ env.GPU_ARCHS }}" python3 setup.py bdist_wheel && ls dist/*.whl'
- name: Upload whl file as artifact
if: ${{ matrix.build_enabled }}
uses: actions/upload-artifact@v4
with:
name: aiter-whl-packages-py${{ matrix.python_version }}-${{ github.run_id }}-${{ github.run_attempt }}
path: dist/*.whl
- name: Cleanup container
if: always()
run: |
docker rm -f aiter_build_${{ matrix.python_version }} || true