-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathrelease-download-pytorch-org.yml
More file actions
101 lines (93 loc) · 3.1 KB
/
Copy pathrelease-download-pytorch-org.yml
File metadata and controls
101 lines (93 loc) · 3.1 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Release ecosystem library from test to production.
on:
workflow_dispatch:
inputs:
dryrun:
required: true
type: choice
default: enabled
options:
- enabled
- disabled
package:
description: "Domain to prepare and release"
required: true
type: choice
default: torchvision
options:
- torchao
- torchtune
- executorch
- torchvision
- torchaudio
- torchcodec
- torchcomms
- torch_tensorrt
- torch_tensorrt_rtx
- torchrec
- fbgemm_gpu
- fbgemm_gpu_genai
- mslk
- flash_attn_3
permissions:
id-token: write
contents: read
jobs:
trigger:
runs-on: ubuntu-latest
timeout-minutes: 30
environment: promote-env
container:
image: pytorch/almalinux-builder:cpu
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Configure aws credentials (pytorch account)
uses: aws-actions/configure-aws-credentials@50ac8dd1e1b10d09dac7b8727528b91bed831ac0 # v3.0.2
with:
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_promote_wheels
aws-region: us-east-1
- name: Promote library to download.pytorch.org
shell: bash
env:
PACKAGE: ${{ inputs.package || 'torchvision' }}
DRY_RUN: ${{ inputs.dryrun || 'enabled' }}
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
run: |
set -ex
cd release
# Install requirements
pip install awscli==1.32.18
pip install -r ../s3_management/requirements.txt
promote_s3() {
local package_name
package_name=$1
local package_type
package_type=$2
local promote_version
promote_version=$3
# shellcheck disable=SC2086
echo "=-=-=-= Promoting ${package_name}'s v${promote_version} ${package_type} packages' =-=-=-="
(
set -x
# shellcheck disable=SC2086
TEST_PYTORCH_PROMOTE_VERSION="${promote_version}" \
PACKAGE_NAME="${package_name}" \
PACKAGE_TYPE="${package_type}" \
TEST_WITHOUT_GIT_TAG=1 \
DRY_RUN="${DRY_RUN}" ./promote/s3_to_s3.sh
)
echo
}
# Init release versions variables
source ./release_versions.sh
# Run promotion
# shellcheck disable=SC2086
version="${PACKAGE^^}_VERSION"
# do not upload FA3 test wheels with local date suffix
if [[ "${PACKAGE}" == "flash_attn_3" ]]; then
export PACKAGE_INCLUDE_SUFFIX="-*"
fi
# shellcheck disable=SC2086
promote_s3 ${PACKAGE} whl "${!version}"