Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance hard code for export dir in deploy component #823

Merged
merged 1 commit into from
Feb 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/kubeflow/deployer/src/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ SERVER_NAME="${SERVER_NAME:-model-server}"

while (($#)); do
case $1 in
"--model-path")
"--model-export-path")
shift
MODEL_PATH="$1"
MODEL_EXPORT_PATH="$1"
shift
;;
"--cluster-name")
Expand Down Expand Up @@ -53,12 +53,12 @@ while (($#)); do
esac
done

if [ -z "${MODEL_PATH}" ]; then
if [ -z "${MODEL_EXPORT_PATH}" ]; then
echo "You must specify a path to the saved model"
exit 1
fi

echo "Deploying the model '${MODEL_PATH}'"
echo "Deploying the model '${MODEL_EXPORT_PATH}'"

if [ -z "${CLUSTER_NAME}" ]; then
CLUSTER_NAME=$(wget -q -O- --header="Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-name)
Expand Down Expand Up @@ -98,7 +98,7 @@ ks pkg install kubeflow/tf-serving@${KUBEFLOW_VERSION}

echo "Generating the TF Serving config..."
ks generate tf-serving server --name="${SERVER_NAME}"
ks param set server modelPath "${MODEL_PATH}/export/export"
ks param set server modelPath "${MODEL_EXPORT_PATH}"

# support local storage to deploy tf-serving.
if [ -n "${PVC_NAME}" ];then
Expand Down