事前準備
- 請先完成所有必要步驟,再開始快速入門。
使用市集應用程式 UI 部署 API
使用指令列部署市集應用程式
您可以使用自訂的參數值設定設定酬載,也可以使用一組預設值,方便複製貼上。如果您想使用自訂參數值,請選擇下方的選項 A。否則,請使用選項 B 中的預設值。
選項 A:設定酬載,其中包含自訂值:
PARAMETERS='{ "name": "'$NAME'", "namespace": "'$NAMESPACE'", "asr.publicIP": "'$PUBLIC_IP'", "asr.cpu": '$CPU', "asr.memory": "'$MEMORY'", "reportingSecret": "reporting-secret", "asr.image": "gcr.io/cloud-marketplace/speech-onprem/speech-to-text-on-prem:'$VERSION'", "configure.image": "gcr.io/cloud-marketplace/speech-onprem/speech-to-text-on-prem/configure:'$VERSION'", "asr.metric_project_id": "'$METRIC_PROJECT'", "asr.gsa_secret": "'$GSA_SECRET'", "istio.enabled": "'$ENABLE_ISTIO'", "configure.model1": "'$MODEL1'", "configure.model2": "'$MODEL2'", "configure.model3": "'$MODEL3'" }'
選項 B:預設設定酬載:
PARAMETERS='{ "name": "speech", "namespace": "speech", "reportingSecret": "reporting-secret", "asr.image": "gcr.io/cloud-marketplace/speech-onprem/speech-to-text-on-prem:'$VERSION'", "configure.image": "gcr.io/cloud-marketplace/speech-onprem/speech-to-text-on-prem/configure:'$VERSION'", "asr.metric_project_id": "$METRIC_PROJECT", }'
選取版本:
VERSION=1.0
如果是內部部署叢集,請執行下列指令($KUBECONFIG 是使用者叢集的 yaml 檔案路徑):
export KUBE_CONFIG=${KUBECONFIG}
執行部署指令:
mpdev /scripts/install --deployer=gcr.io/cloud-marketplace/speech-onprem/speech-to-text-on-prem/deployer:$VERSION --parameters="$PARAMETERS"
檢查部署作業是否已完成 (首次執行時可能需要幾分鐘的時間)。READY 的 Pod 數量應與您選擇的 $REPLICA 值相符。
kubectl get deployment $NAME --namespace $NAMESPACE
例如:
後續步驟
瞭解如何傳送查詢至 Speech-to-Text On-Prem API。