Skip to content

Commit c6ebd4e

Browse files
committed
Upload containers to ECR
1 parent df7ce34 commit c6ebd4e

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,6 @@ jobs:
3030
instructions: |
3131
Build is done inside the container, to start an interactive session run:
3232
docker exec -it $(docker container ps --format '{{.ID}}') bash
33-
- name: Install gcloud CLI
34-
shell: bash
35-
run: |
36-
sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM
37-
[google-cloud-cli]
38-
name=Google Cloud CLI
39-
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64
40-
enabled=1
41-
gpgcheck=1
42-
repo_gpgcheck=0
43-
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
44-
EOM
45-
sudo yum install -y google-cloud-cli
46-
- name: Auth to GCR
47-
shell: bash
48-
run: |
49-
echo "${GCLOUD_SERVICE_KEY}" | gcloud auth activate-service-account --key-file=-
50-
gcloud auth configure-docker --quiet
5133
5234
- name: Checkout repo
5335
uses: actions/checkout@v3
@@ -103,11 +85,14 @@ jobs:
10385
uses: pytorch/test-infra/.github/actions/teardown-linux@main
10486
if: always()
10587

106-
test-cpu:
107-
# needs: build
108-
runs-on: linux.4xlarge
88+
test:
89+
needs: build
90+
strategy:
91+
matrix:
92+
runner: [linux.4x.large, linux.8xlarge.nvidia.gpu]
93+
runs-on: ${{ matrix.runner }}
10994
env:
110-
GCR_DOCKER_IMAGE: gcr.io/tpu-pytorch/xla_base:latest
95+
ECR_DOCKER_IMAGE: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/xla_base:latest
11196
WORKDIR: /var/lib/jenkins/workspace
11297
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }}
11398
steps:
@@ -121,8 +106,7 @@ jobs:
121106
- name: Download and run docker image from GCR
122107
shell: bash
123108
run: |
124-
#export COMMIT_DOCKER_IMAGE="${GCR_DOCKER_IMAGE}-${GITHUB_SHA}"
125-
export COMMIT_DOCKER_IMAGE="${GCR_DOCKER_IMAGE}-273e9d5d3296ab295f6891d003c4ea95515c384c"
109+
export COMMIT_DOCKER_IMAGE="${ECR_DOCKER_IMAGE}-${GITHUB_SHA}"
126110
echo "DOCKER_IMAGE: "${COMMIT_DOCKER_IMAGE}
127111
docker pull "${COMMIT_DOCKER_IMAGE}"
128112
pid=$(docker run -t -d -w $WORKDIR ${COMMIT_DOCKER_IMAGE})

0 commit comments

Comments
 (0)