Skip to content

Commit

Permalink
Enhance deploy.sh to support local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchihe committed Feb 2, 2019
1 parent 2c6ad29 commit f4179cd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/kubeflow/deployer/src/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ while (($#)); do
SERVER_NAME="$1"
shift
;;
"--pvc-name")
shift
PVC_NAME="$1"
shift
;;
*)
echo "Unknown argument: '$1'"
exit 1
Expand Down Expand Up @@ -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 [ -n "${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

Expand Down

0 comments on commit f4179cd

Please sign in to comment.