File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ pipeline {
5858 }
5959 stage(' tensorflow TPU' ) {
6060 options {
61- timeout(time : 360 , unit : ' MINUTES' )
61+ timeout(time : 240 , unit : ' MINUTES' )
6262 }
6363 steps {
6464 sh ''' #!/bin/bash
@@ -177,6 +177,14 @@ pipeline {
177177 sh ''' #!/bin/bash
178178 set -exo pipefail
179179
180+ # Login to docker to get access to gcr.io/cloud-tpu-v2-images/libtpu
181+ 182+ # To grant access to a SA, start a TPU VM with that SA once.
183+ METADATA=http://metadata.google.internal/computeMetadata/v1
184+ SVC_ACCT=$METADATA/instance/service-accounts/default
185+ ACCESS_TOKEN=$(/usr/bin/curl -s -H 'Metadata-Flavor: Google' $SVC_ACCT/token | cut -d'"' -f 4)
186+ docker login --username oauth2accesstoken --password $ACCESS_TOKEN https://gcr.io
187+
180188 ./tpu/build | ts
181189 ./push --tpu ${PRETEST_TAG}
182190 '''
You can’t perform that action at this time.
0 commit comments