Spaces:
Sleeping
Sleeping
Commit
·
5d51762
1
Parent(s):
e9072c9
fix: try to change model and endpoint id var
Browse files
core-model-prediction/cloudbuild.yaml
CHANGED
|
@@ -14,7 +14,7 @@ steps:
|
|
| 14 |
args:
|
| 15 |
- "-c"
|
| 16 |
- |
|
| 17 |
-
|
| 18 |
--region="us-central1" \
|
| 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="us-central1" \
|
| 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="us-central1" \
|
| 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="us-central1" \
|
| 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="us-central1" \
|
| 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="us-central1" \
|
| 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" \
|