-
Notifications
You must be signed in to change notification settings - Fork 31
/
cloudbuild-pr.yaml
145 lines (145 loc) · 3.92 KB
/
cloudbuild-pr.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
steps:
# deploy
- name: gcr.io/cloud-builders/docker
id: pull-deploy
waitFor: ['-']
args:
- pull
- 'gcr.io/llm-containers/deploy:latest'
- name: gcr.io/cloud-builders/docker
id: build-deploy
waitFor: ['pull-deploy']
args:
- build
- '-t'
- 'gcr.io/llm-containers/deploy:githubpr${_PR_NUMBER}'
- '--cache-from'
- 'gcr.io/llm-containers/deploy:latest'
- '-f'
- docker/deploy.Dockerfile
- .
- name: gcr.io/cloud-builders/docker
id: push-deploy
waitFor: ['build-deploy']
args:
- push
- 'gcr.io/llm-containers/deploy:githubpr${_PR_NUMBER}'
# batch
- name: gcr.io/cloud-builders/docker
id: pull-batch
waitFor: ['-']
args:
- pull
- 'gcr.io/llm-containers/batch:latest'
- name: gcr.io/cloud-builders/docker
id: build-batch
waitFor: ['pull-batch']
args:
- build
- '-t'
- 'gcr.io/llm-containers/batch:githubpr${_PR_NUMBER}'
- '--cache-from'
- 'gcr.io/llm-containers/batch:latest'
- '-f'
- docker/batch.Dockerfile
- .
- name: gcr.io/cloud-builders/docker
id: push-batch
waitFor: ['build-batch']
args:
- push
- 'gcr.io/llm-containers/batch:githubpr${_PR_NUMBER}'
# train
- name: gcr.io/cloud-builders/docker
id: pull-train
waitFor: ['-']
args:
- pull
- 'gcr.io/llm-containers/train:latest'
- name: gcr.io/cloud-builders/docker
id: build-train
waitFor: ['pull-train']
args:
- build
- '-t'
- 'gcr.io/llm-containers/train:githubpr${_PR_NUMBER}'
- '--cache-from'
- 'gcr.io/llm-containers/train:latest'
- '-f'
- docker/train.Dockerfile
- .
- name: gcr.io/cloud-builders/docker
id: push-train
waitFor: ['build-train']
args:
- push
- 'gcr.io/llm-containers/train:githubpr${_PR_NUMBER}'
#predict
- name: gcr.io/cloud-builders/docker
id: pull-predict
waitFor: ['-']
args:
- pull
- 'gcr.io/llm-containers/predict:latest'
- name: gcr.io/cloud-builders/docker
id: build-predict
waitFor: ['pull-predict']
args:
- build
- '-t'
- 'gcr.io/llm-containers/predict:githubpr${_PR_NUMBER}'
- '--cache-from'
- 'gcr.io/llm-containers/predict:latest'
- '-f'
- docker/predict.Dockerfile
- .
- name: gcr.io/cloud-builders/docker
id: push-predict
waitFor: ['build-predict']
args:
- push
- 'gcr.io/llm-containers/predict:githubpr${_PR_NUMBER}'
# test
- name: gcr.io/cloud-builders/docker
id: build-test
waitFor: ['-']
args:
- build
- '-t'
- test_docker
- '--build-arg'
- 'MODEL_NAME_APPEND=${_PR_NUMBER}'
- '-f'
- docker/test.Dockerfile
- .
- name: gcr.io/cloud-builders/docker
id: run-test
waitFor: ['push-deploy', 'push-batch', 'push-train', 'push-predict', 'build-test']
args:
- run
- '--network=cloudbuild'
- test_docker
- '--enable_caching=0'
- '--config=small1vm1gpu.json'
- '--image_tag=githubpr${_PR_NUMBER}'
- '--project=$PROJECT_ID'
- '--pipeline_root=gs://t5-shared/pipeline_runs/'
- '--cleanup_endpoint'
- '--endpoint_name=t5-githubpr${_PR_NUMBER}'
timeout: 86400s
options:
pool:
name: projects/llm-containers/locations/us-central1/workerPools/deepspeed-build