@@ -107,6 +107,8 @@ function cluster_up_gcp() {
107107 gcloud auth activate-service-account --key-file $GOOGLE_APPLICATION_CREDENTIALS > /dev/null 2>&1
108108 gcloud container clusters get-credentials $CORTEX_CLUSTER_NAME --project $CORTEX_GCP_PROJECT --region $CORTEX_GCP_ZONE > /dev/null 2>&1 # write both stderr and stdout to dev/null
109109
110+ start_pre_download_images
111+
110112 echo -n " ○ updating cluster configuration "
111113 setup_configmap_gcp
112114 setup_secrets_gcp
@@ -128,6 +130,8 @@ function cluster_up_gcp() {
128130
129131 validate_cortex_gcp
130132
133+ await_pre_download_images
134+
131135 echo -e " \ncortex is ready!"
132136
133137 print_endpoints_gcp
@@ -470,7 +474,7 @@ function start_pre_download_images() {
470474 export CORTEX_IMAGE_TENSORFLOW_SERVING_INF=" ${registry} /tensorflow-serving-inf:${tag} "
471475 export CORTEX_IMAGE_TENSORFLOW_PREDICTOR=" ${registry} /tensorflow-predictor:${tag} "
472476
473- if [[ " $CORTEX_INSTANCE_TYPE " == p* ]] || [[ " $CORTEX_INSTANCE_TYPE " == g* ]]; then
477+ if [[ " $CORTEX_INSTANCE_TYPE " == p* ]] || [[ " $CORTEX_INSTANCE_TYPE " == g* ]] || [ -n " $CORTEX_ACCELERATOR_TYPE " ] ; then
474478 envsubst < manifests/image-downloader-gpu.yaml | kubectl apply -f - & > /dev/null
475479 elif [[ " $CORTEX_INSTANCE_TYPE " == inf* ]]; then
476480 envsubst < manifests/image-downloader-inf.yaml | kubectl apply -f - & > /dev/null
@@ -485,7 +489,7 @@ function await_pre_download_images() {
485489 printed_dot=" false"
486490 i=0
487491 until [ " $( kubectl get daemonset image-downloader -n=default -o ' jsonpath={.status.numberReady}' ) " == " $( kubectl get daemonset image-downloader -n=default -o ' jsonpath={.status.desiredNumberScheduled}' ) " ]; do
488- if [ $i -eq 100 ]; then break ; fi # give up after 5 minutes
492+ if [ $i -eq 120 ]; then break ; fi # give up after 6 minutes
489493 echo -n " ."
490494 printed_dot=" true"
491495 (( i= i+ 1 ))
0 commit comments