mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-12-25 05:22:43 +00:00
74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
name: Release bdist wheel
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
cuda_version:
|
|
type: choice
|
|
description: CUDA Version
|
|
default: 'all'
|
|
required: true
|
|
options:
|
|
- all
|
|
- "11.3"
|
|
- "11.1"
|
|
- "10.2"
|
|
github_ref:
|
|
type: string
|
|
description: Branch or Tag
|
|
default: 'main'
|
|
required: true
|
|
|
|
jobs:
|
|
matrix_preparation:
|
|
name: Prepare Container List
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- id: set-matrix
|
|
run: |
|
|
[ "${{github.event.inputs.cuda_version}}" != "" ] && matrix="[\"hpcaitech/cuda-conda:${{github.event.inputs.cuda_version}}\"]"
|
|
[ "${{github.event.inputs.cuda_version}}" == "" ] || [ "${{github.event.inputs.cuda_version}}" == "all" ] && \
|
|
matrix="[\"hpcaitech/cuda-conda:11.3\", \"hpcaitech/cuda-conda:11.1\", \"hpcaitech/cuda-conda:10.2\"]"
|
|
echo $matrix
|
|
echo "::set-output name=matrix::{\"container\":$(echo $matrix)}"
|
|
|
|
build:
|
|
name: Release bdist wheels
|
|
needs: matrix_preparation
|
|
if: github.repository == 'hpcaitech/ColossalAI' && contains(fromJson('["FrankLeeeee", "ver217", "feifeibear", "kurisusnowdeng"]'), github.actor)
|
|
runs-on: [self-hosted, gpu]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{fromJson(needs.matrix_preparation.outputs.matrix)}}
|
|
container:
|
|
image: ${{ matrix.container }}
|
|
options: --gpus all --rm
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
# cub is for cuda 10.2
|
|
- name: Copy scripts and checkout
|
|
run: |
|
|
cp -r ./.github/workflows/scripts/* ./
|
|
ln -s /github/home/pip_wheels ./pip_wheels
|
|
git checkout $git_ref
|
|
wget https://github.com/NVIDIA/cub/archive/refs/tags/1.8.0.zip
|
|
unzip 1.8.0.zip
|
|
env:
|
|
git_ref: ${{ github.event.inputs.github_ref }}
|
|
- name: Build bdist wheel
|
|
run: |
|
|
pip install beautifulsoup4 requests packaging
|
|
python ./build_colossalai_wheel.py
|
|
- name: 🚀 Deploy
|
|
uses: garygrossgarten/github-action-scp@release
|
|
with:
|
|
local: all_dist
|
|
remote: ${{ secrets.PRIVATE_PYPI_DIR }}
|
|
host: ${{ secrets.PRIVATE_PYPI_HOST }}
|
|
username: ${{ secrets.PRIVATE_PYPI_USER }}
|
|
password: ${{ secrets.PRIVATE_PYPI_PASSWD }}
|