-
Notifications
You must be signed in to change notification settings - Fork 172
50 lines (43 loc) · 1.37 KB
/
nightly-build.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
50
name: PyPI Nightly Build
on:
schedule:
- cron: '0 0 * * *' # Runs at midnight UTC every day
workflow_dispatch:
### Comment this out before merge
push:
branches:
- main
pull_request:
branches:
- main
###
jobs:
build-and-publish:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
secrets: inherit
with:
runner: linux.g5.12xlarge.nvidia.gpu
gpu-arch-type: cuda
gpu-arch-version: "12.1"
secrets-env: PYPI_API_TOKEN
script: |
# Install dependencies
conda create -n venv python=3.9 -y
conda activate venv
echo "::group::Install newer objcopy that supports --set-section-alignment"
yum install -y devtoolset-10-binutils
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
python -m pip install --upgrade pip
pip install setuptools wheel twine build
pip install torch
pip install -r requirements.txt
pip install -r dev-requirements.txt
# Create wheel file
export TORCHAO_NIGHTLY=1
python -m pip install build
# Binary validation
# pip install dist/torchao*.whl
# pytest test --verbose -s
# Upload
REPOSITORY_URL="https://upload.pypi.org/legacy/"
twine upload --repository-url $REPOSITORY_URL -u __token__ -p $SECRET_PYPI_API_TOKEN torchao*.whl