1*da0073e9SAndroid Build Coastguard Worker# PyTorch Release Scripts 2*da0073e9SAndroid Build Coastguard Worker 3*da0073e9SAndroid Build Coastguard WorkerThese are a collection of scripts that are to be used for release activities. 4*da0073e9SAndroid Build Coastguard Worker 5*da0073e9SAndroid Build Coastguard Worker> NOTE: All scripts should do no actual work unless the `DRY_RUN` environment variable is set 6*da0073e9SAndroid Build Coastguard Worker> to `disabled`. 7*da0073e9SAndroid Build Coastguard Worker> The basic idea being that there should be no potential to do anything dangerous unless 8*da0073e9SAndroid Build Coastguard Worker> `DRY_RUN` is explicitly set to `disabled`. 9*da0073e9SAndroid Build Coastguard Worker 10*da0073e9SAndroid Build Coastguard Worker## Requirements to actually run these scripts 11*da0073e9SAndroid Build Coastguard Worker* AWS access to pytorch account 12*da0073e9SAndroid Build Coastguard Worker* Access to upload conda packages to the `pytorch` conda channel 13*da0073e9SAndroid Build Coastguard Worker* Access to the PyPI repositories 14*da0073e9SAndroid Build Coastguard Worker 15*da0073e9SAndroid Build Coastguard Worker 16*da0073e9SAndroid Build Coastguard Worker## Promote 17*da0073e9SAndroid Build Coastguard Worker 18*da0073e9SAndroid Build Coastguard WorkerThese are scripts related to promotion of release candidates to GA channels, these 19*da0073e9SAndroid Build Coastguard Workercan actually be used to promote pytorch, libtorch, and related domain libraries. 20*da0073e9SAndroid Build Coastguard Worker 21*da0073e9SAndroid Build Coastguard Worker### Usage 22*da0073e9SAndroid Build Coastguard Worker 23*da0073e9SAndroid Build Coastguard WorkerUsage should be fairly straightforward and should actually require no extra variables 24*da0073e9SAndroid Build Coastguard Workerif you are running from the correct git tags. (i.e. the GA tag to promote is currently 25*da0073e9SAndroid Build Coastguard Workerchecked out) 26*da0073e9SAndroid Build Coastguard Worker 27*da0073e9SAndroid Build Coastguard Worker`PACKAGE_TYPE` and `PACKAGE_NAME` can be swapped out to promote other packages. 28*da0073e9SAndroid Build Coastguard Worker 29*da0073e9SAndroid Build Coastguard Worker#### Promoting pytorch wheels 30*da0073e9SAndroid Build Coastguard Worker```bash 31*da0073e9SAndroid Build Coastguard Workerpromote/s3_to_s3.sh 32*da0073e9SAndroid Build Coastguard Worker``` 33*da0073e9SAndroid Build Coastguard Worker 34*da0073e9SAndroid Build Coastguard Worker#### Promoting libtorch archives 35*da0073e9SAndroid Build Coastguard Worker```bash 36*da0073e9SAndroid Build Coastguard WorkerPACKAGE_TYPE=libtorch PACKAGE_NAME=libtorch promote/s3_to_s3.sh 37*da0073e9SAndroid Build Coastguard Worker``` 38*da0073e9SAndroid Build Coastguard Worker 39*da0073e9SAndroid Build Coastguard Worker#### Promoting conda packages 40*da0073e9SAndroid Build Coastguard Worker```bash 41*da0073e9SAndroid Build Coastguard Workerpromote/conda_to_conda.sh 42*da0073e9SAndroid Build Coastguard Worker``` 43*da0073e9SAndroid Build Coastguard Worker 44*da0073e9SAndroid Build Coastguard Worker#### Promoting wheels to PyPI 45*da0073e9SAndroid Build Coastguard Worker**WARNING**: These can only be run once and cannot be undone, run with caution 46*da0073e9SAndroid Build Coastguard Worker``` 47*da0073e9SAndroid Build Coastguard Workerpromote/wheel_to_pypi.sh 48*da0073e9SAndroid Build Coastguard Worker``` 49*da0073e9SAndroid Build Coastguard Worker 50*da0073e9SAndroid Build Coastguard Worker## Restoring backups 51*da0073e9SAndroid Build Coastguard Worker 52*da0073e9SAndroid Build Coastguard WorkerAll release candidates are currently backed up to `s3://pytorch-backup/${TAG_NAME}` and 53*da0073e9SAndroid Build Coastguard Workercan be restored to the test channels with the `restore-backup.sh` script. 54*da0073e9SAndroid Build Coastguard Worker 55*da0073e9SAndroid Build Coastguard WorkerWhich backup to restore from is dictated by the `RESTORE_FROM` environment variable. 56*da0073e9SAndroid Build Coastguard Worker 57*da0073e9SAndroid Build Coastguard Worker### Usage 58*da0073e9SAndroid Build Coastguard Worker```bash 59*da0073e9SAndroid Build Coastguard WorkerRESTORE_FROM=v1.5.0-rc5 ./restore-backup.sh 60*da0073e9SAndroid Build Coastguard Worker``` 61