diff --git a/components/kubeflow/deployer/src/deploy.sh b/components/kubeflow/deployer/src/deploy.sh index 8a310c74052..ce4f7c0f567 100755 --- a/components/kubeflow/deployer/src/deploy.sh +++ b/components/kubeflow/deployer/src/deploy.sh @@ -41,6 +41,11 @@ while (($#)); do SERVER_NAME="$1" shift ;; + "--pvc-name") + shift + PVC_NAME="$1" + shift + ;; *) echo "Unknown argument: '$1'" exit 1 @@ -95,6 +100,14 @@ echo "Generating the TF Serving config..." ks generate tf-serving server --name="${SERVER_NAME}" ks param set server modelPath "${MODEL_PATH}/export/export" +# support local storage to deploy tf-serving. +if [ ! -z "${PVC_NAME}" ];then + # TODO: Remove modelStorageType setting after the hard code nfs was removed at + # https://github.com/kubeflow/kubeflow/blob/v0.4-branch/kubeflow/tf-serving/tf-serving.libsonnet#L148-L151 + ks param set server modelStorageType nfs + ks param set server nfsPVC "${PVC_NAME}" +fi + echo "Deploying the TF Serving service..." ks apply default -c server