Skip to content

Build Wheels

Build Wheels #6

Workflow file for this run

name: Build Wheels
on: workflow_dispatch
jobs:
build_wheels:
name: Build wheel for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-latest]
defaults:
run:
shell: pwsh
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Setup Mamba
uses: conda-incubator/[email protected]
with:
activate-environment: "build"
python-version: 3.8
mamba-version: "*"
use-mamba: true
channels: conda-forge,defaults
channel-priority: true
add-pip-as-python-dependency: true
auto-activate-base: false
- name: Install Dependencies
run: |
mamba install -y 'pytorch[version=2.0.0,build=py*_cuda11.8*]' 'pytorch-cuda=11.8' 'sentencepiece' 'cuda' 'ninja' -c 'pytorch' -c 'nvidia/label/cuda-11.8.0' -c 'nvidia' -c 'conda-forge' -c 'defaults'
python -m pip install build transformers==4.28.0 datasets safetensors accelerate==0.18.0
- name: Build Wheel
run: |
$env:CUDA_PATH = $env:CONDA_PREFIX
$env:CUDA_HOME = $env:CONDA_PREFIX
if ($IsLinux) {$env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH}
$env:TORCH_CUDA_ARCH_LIST = '6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX'
python -m build -n --wheel
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl