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