Skip to content

CI: Add Aiter Release Package CI #13

CI: Add Aiter Release Package CI

CI: Add Aiter Release Package CI #13

Workflow file for this run

name: Aiter Release Package
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: false
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
BUILD_DOCKER_IMAGE: "rocm/dev-ubuntu-22.04:7.0-complete"
jobs:
build_whl_package:
runs-on: aiter-k8s-build
steps:
- name: Checkout aiter repo
uses: actions/checkout@v4
- name: Sync submodules
run: |
set -e
git submodule sync
git submodule update --init --recursive --depth 1 --jobs 4
- name: Run the container
run: |
set -ex
echo "Starting container: aiter_build"
docker run -dt \
--shm-size=16G \
-v "${{ github.workspace }}:/workspace" \
-w /workspace \
--name aiter_build \
${{ env.BUILD_DOCKER_IMAGE }}
- name: Install Python and other dependencies
run: |
set -e
echo "Install Python and other dependencies"
docker exec \
-e PYTHON_VERSION=3.12 \
-w /workspace \
aiter_build \
bash -c '
apt-get update -y \
&& apt-get install -y software-properties-common git curl sudo vim less libgfortran5 \
&& for i in 1 2 3; do \
add-apt-repository -y ppa:deadsnakes/ppa && break || \
{ echo "Attempt $i failed, retrying in 5s..."; sleep 5; }; \
done \
&& apt-get update -y \
&& apt-get install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv \
python${PYTHON_VERSION}-lib2to3 python-is-python3 \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
&& update-alternatives --set python3 /usr/bin/python${PYTHON_VERSION} \
&& ln -sf /usr/bin/python${PYTHON_VERSION}-config /usr/bin/python3-config \
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \
&& python3 --version && python3 -m pip --version
'
- name: Install Dependencies
run: |
set -e
echo "Install Dependencies"
docker exec \
-w /workspace \
aiter_build \
pip install -r requirements.txt
- name: Build Relase Package
run: |
set -e
echo "Building aiter whl packages..."
docker exec \
-e PREBUILD_KERNELS=1 \
-e GPU_ARCHS="gfx942;gfx950" \
-w /workspace \
aiter_build \
python3 setup.py bdist_wheel
docker exec -w /workspace aiter_build ls dist/*.whl