Spaces:
Running
Running
Commit
·
be01f94
1
Parent(s):
5a2c3e3
fix: try to have dynamic substitutions
Browse files
core-model-prediction/cloudbuild.yaml
CHANGED
@@ -14,7 +14,7 @@ steps:
|
|
14 |
args:
|
15 |
- "-c"
|
16 |
- |
|
17 |
-
|
18 |
--region="$_GCP_VERTEX_AI_REGION" \
|
19 |
--container-ports=8080 \
|
20 |
--container-image-uri="gcr.io/$PROJECT_ID/interview-ai-detector/model-prediction:latest" \
|
@@ -22,27 +22,27 @@ steps:
|
|
22 |
--container-health-route="/health" \
|
23 |
--display-name="interview-ai-detector-model" \
|
24 |
--format="value(model)")
|
25 |
-
echo "
|
26 |
|
27 |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
|
28 |
entrypoint: "bash"
|
29 |
args:
|
30 |
- "-c"
|
31 |
- |
|
32 |
-
|
33 |
--region="$_GCP_VERTEX_AI_REGION" \
|
34 |
--display-name="interview-ai-detector-endpoint" \
|
35 |
--format="value(name)")
|
36 |
-
echo "
|
37 |
|
38 |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
|
39 |
entrypoint: "bash"
|
40 |
args:
|
41 |
- "-c"
|
42 |
- |
|
43 |
-
gcloud ai endpoints deploy-model "$
|
44 |
--region="$_GCP_VERTEX_AI_REGION" \
|
45 |
-
--model="$
|
46 |
--display-name="interview-ai-detector-deployment" \
|
47 |
--machine-type="n1-standard-4" \
|
48 |
--accelerator="count=1,type=nvidia-tesla-t4" \
|
|
|
14 |
args:
|
15 |
- "-c"
|
16 |
- |
|
17 |
+
_MODEL_ID=$(gcloud ai models upload \
|
18 |
--region="$_GCP_VERTEX_AI_REGION" \
|
19 |
--container-ports=8080 \
|
20 |
--container-image-uri="gcr.io/$PROJECT_ID/interview-ai-detector/model-prediction:latest" \
|
|
|
22 |
--container-health-route="/health" \
|
23 |
--display-name="interview-ai-detector-model" \
|
24 |
--format="value(model)")
|
25 |
+
echo "_MODEL_ID=${_MODEL_ID}"
|
26 |
|
27 |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
|
28 |
entrypoint: "bash"
|
29 |
args:
|
30 |
- "-c"
|
31 |
- |
|
32 |
+
_ENDPOINT_ID=$(gcloud ai endpoints create \
|
33 |
--region="$_GCP_VERTEX_AI_REGION" \
|
34 |
--display-name="interview-ai-detector-endpoint" \
|
35 |
--format="value(name)")
|
36 |
+
echo "_ENDPOINT_ID=${_ENDPOINT_ID}"
|
37 |
|
38 |
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
|
39 |
entrypoint: "bash"
|
40 |
args:
|
41 |
- "-c"
|
42 |
- |
|
43 |
+
gcloud ai endpoints deploy-model "$_ENDPOINT_ID" \
|
44 |
--region="$_GCP_VERTEX_AI_REGION" \
|
45 |
+
--model="$_MODEL_ID" \
|
46 |
--display-name="interview-ai-detector-deployment" \
|
47 |
--machine-type="n1-standard-4" \
|
48 |
--accelerator="count=1,type=nvidia-tesla-t4" \
|