-
Notifications
You must be signed in to change notification settings - Fork 510
/
Copy pathdebug_cloudbuild.yaml
36 lines (35 loc) · 1.34 KB
/
debug_cloudbuild.yaml
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
# Cloud Build Configuration which:
# Builds and pushes gcr.io/tpu-pytorch/xla_debug image.
steps:
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:slim'
args: ['bash', 'docker/debug_image_cleanup.sh']
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--build-arg', 'base_image=${_DOCKER_BASE_IMAGE}',
'--build-arg', 'cuda=${_CUDA}',
'--build-arg', 'python_version=${_PYTHON_VERSION}',
'--build-arg', 'cloud_build=true',
'--build-arg', 'release_version=${_RELEASE_VERSION}',
'-t', 'gcr.io/tpu-pytorch/xla_debug:${_TAG_NAME}',
'--cache-from', 'gcr.io/tpu-pytorch/xla_debug:nightly_3.6',
'-f', 'docker/Dockerfile', '.'
]
timeout: 14400s
- name: 'gcr.io/cloud-builders/docker'
entrypoint: bash
args: ['-c', 'docker tag gcr.io/tpu-pytorch/xla_debug:${_TAG_NAME} gcr.io/tpu-pytorch/xla_debug:${_TAG_NAME}_$(date -u +%Y%m%d_%H_%M)']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/tpu-pytorch/xla_debug']
timeout: 1800s
options:
machineType: 'N1_HIGHCPU_32'
dynamic_substitutions: true
substitution_option: 'ALLOW_LOOSE'
substitutions:
_DOCKER_BASE_IMAGE: 'debian:buster'
_CUDA: '0'
_PYTHON_VERSION: '3.6'
_RELEASE_VERSION: 'nightly' # or rX.Y
_TAG_NAME: '${_RELEASE_VERSION}_${_PYTHON_VERSION}'
timeout: 18000s