Skip to content

Commit

Permalink
Merge pull request Kaggle#1160 from Kaggle/fix-libtpu-access
Browse files Browse the repository at this point in the history
Fix access to libtpu
  • Loading branch information
djherbis committed May 17, 2022
2 parents 2aa1486 + e4b1240 commit b6ba531
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pipeline {
}
stage('tensorflow TPU') {
options {
timeout(time: 360, unit: 'MINUTES')
timeout(time: 240, unit: 'MINUTES')
}
steps {
sh '''#!/bin/bash
Expand Down Expand Up @@ -177,6 +177,14 @@ pipeline {
sh '''#!/bin/bash
set -exo pipefail
# Login to docker to get access to gcr.io/cloud-tpu-v2-images/libtpu
# SA: [email protected]
# To grant access to a SA, start a TPU VM with that SA once.
METADATA=http:https://metadata.google.internal/computeMetadata/v1
SVC_ACCT=$METADATA/instance/service-accounts/default
ACCESS_TOKEN=$(/usr/bin/curl -s -H 'Metadata-Flavor: Google' $SVC_ACCT/token | cut -d'"' -f 4)
docker login --username oauth2accesstoken --password $ACCESS_TOKEN https://gcr.io
./tpu/build | ts
./push --tpu ${PRETEST_TAG}
'''
Expand Down

0 comments on commit b6ba531

Please sign in to comment.