-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
27 lines (27 loc) · 1011 Bytes
/
cloudbuild.yaml
File metadata and controls
27 lines (27 loc) · 1011 Bytes
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
steps:
# Build the Docker image
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/model-endpoint', '.']
# Push the Docker image to Google Container Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/model-endpoint']
# Deploy the Docker image to Cloud Run
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'run'
- 'deploy'
- 'model-endpoint'
- '--image'
- 'gcr.io/$PROJECT_ID/model-endpoint'
- '--platform'
- 'managed'
- '--region'
- 'us-central1'
- '--cpu=2'
- '--memory=4Gi'
- '--min-instances=1'
- '--max-instances=2'
- '--allow-unauthenticated'
- '--timeout=900' # Increase the timeout to 900 seconds (15 minutes)
- '--no-cpu-throttling' # This is the new line that adds CPU allocation always on
# You can add additional options here, such as environment variables and service account permissions