bearking58 commited on
Commit
358e4c4
·
1 Parent(s): 88fb029

fix: try to fix model not uploading

Browse files
Files changed (1) hide show
  1. cloudbuild-endpoint.yaml +7 -2
cloudbuild-endpoint.yaml CHANGED
@@ -1,6 +1,8 @@
1
  steps:
2
  - name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
3
  entrypoint: "bash"
 
 
4
  args:
5
  - "-c"
6
  - |
@@ -16,6 +18,8 @@ steps:
16
 
17
  - name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
18
  entrypoint: "bash"
 
 
19
  args:
20
  - "-c"
21
  - |
@@ -27,12 +31,13 @@ steps:
27
 
28
  - name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
29
  entrypoint: "bash"
 
30
  args:
31
  - "-c"
32
  - |
33
- gcloud ai endpoints deploy-model "${cat /workspace/endpoint_id.txt}" \
34
  --region="us-central1" \
35
- --model="${cat /workspace/model_id.txt}" \
36
  --display-name="interview-ai-detector-deployment" \
37
  --machine-type="n1-standard-4" \
38
  --accelerator="count=1,type=nvidia-tesla-t4" \
 
1
  steps:
2
  - name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
3
  entrypoint: "bash"
4
+ id: upload-model
5
+ timeout: 600
6
  args:
7
  - "-c"
8
  - |
 
18
 
19
  - name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
20
  entrypoint: "bash"
21
+ id: create-endpoint
22
+ waitFor: upload-model
23
  args:
24
  - "-c"
25
  - |
 
31
 
32
  - name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
33
  entrypoint: "bash"
34
+ waitFor: create-endpoint
35
  args:
36
  - "-c"
37
  - |
38
+ gcloud ai endpoints deploy-model "${$(cat /workspace/endpoint_id.txt)}" \
39
  --region="us-central1" \
40
+ --model="${$(cat /workspace/model_id.txt)}" \
41
  --display-name="interview-ai-detector-deployment" \
42
  --machine-type="n1-standard-4" \
43
  --accelerator="count=1,type=nvidia-tesla-t4" \