forked from qwopqwop200/GPTQ-for-LLaMa
-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (42 loc) · 1.54 KB
/
build-wheels.yml
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
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 = '3.5 3.7 5.0 5.2 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