forked from pytorch/xla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcloudbuild.yaml
59 lines (58 loc) · 2.23 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Cloud Build Configuration which:
# (1) Builds, tests, and pushes gcr.io/tpu-pytorch/xla image
# (2) Collects and stores torch and torch_xla wheels
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--shm-size', '16gb',
'--build-arg', 'base_image=${_DOCKER_BASE_IMAGE}',
'--build-arg', 'cuda=${_CUDA}',
'--build-arg', 'python_version=${_PYTHON_VERSION}',
'--build-arg', 'release_version=${_RELEASE_VERSION}',
'--build-arg', 'tpuvm=${_TPU_VM}',
'--build-arg', 'bazel_jobs=${_BAZEL_JOBS}',
'--build-arg', 'git_clone=${_GIT_CLONE}',
'--build-arg', 'cuda_compute=${_CUDA_COMPUTE}',
'--build-arg', 'xla_branch=${_GITHUB_XLA_BRANCH}',
'--build-arg', 'examle_branch=${_GITHUB_EXAMPLE_BRANCH}',
'-t', 'gcr.io/tpu-pytorch/xla:${_IMAGE_NAME}',
'-f', 'docker/Dockerfile', '.'
]
timeout: 14400s
- name: 'gcr.io/cloud-builders/docker'
entrypoint: bash
args: ['-c', 'docker tag gcr.io/tpu-pytorch/xla:${_IMAGE_NAME} gcr.io/tpu-pytorch/xla:${_IMAGE_NAME}_$(date -u +%Y%m%d)']
- name: 'gcr.io/tpu-pytorch/xla:${_IMAGE_NAME}'
entrypoint: bash
args: ['-c', 'source /pytorch/xla/docker/common.sh && run_deployment_tests']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', '--all-tags', 'gcr.io/tpu-pytorch/xla']
timeout: 2700s
- name: 'gcr.io/tpu-pytorch/xla:${_IMAGE_NAME}'
entrypoint: 'bash'
args: ['-c', 'source /pytorch/xla/docker/common.sh && collect_wheels ${_RELEASE_VERSION}']
substitutions:
_DOCKER_BASE_IMAGE: 'debian:buster'
_CUDA: '0'
_PYTHON_VERSION: '3.6'
_RELEASE_VERSION: 'nightly' # or rX.Y
_IMAGE_NAME: '${_RELEASE_VERSION}_${_PYTHON_VERSION}'
_UPLOAD_SUBDIR: ''
_TPU_VM: ''
_BAZEL_JOBS: ''
_GIT_CLONE: 'true'
_CUDA_COMPUTE: '3.7,7.0,7.5,8.0'
_GITHUB_XLA_BRANCH: ''
_GITHUB_EXAMPLE_BRANCH: 'master'
options:
pool:
name: 'projects/tpu-pytorch/locations/us-central1/workerPools/wheel_build'
dynamic_substitutions: true
substitution_option: 'ALLOW_LOOSE'
timeout: 32000s
artifacts:
objects:
# CUDA wheels exported under `wheels/cuda/<cuda_version>`
location: 'gs://tpu-pytorch/wheels/$_UPLOAD_SUBDIR'
paths: ['/**/*.whl']