Add docker run command line arguments support for tensorflow-serving

Signed-off-by: Jue Wang <wang.jue@intel.com>
This commit is contained in:
Jue Wang
2019-09-25 16:25:26 +08:00
committed by qzheng527
parent 4c778708fd
commit 0fbd5142df
2 changed files with 13 additions and 3 deletions
+1
View File
@@ -52,3 +52,4 @@ COPY tf_serving_entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/tf_serving_entrypoint.sh
ENTRYPOINT ["tf_serving_entrypoint.sh"]
CMD ["tensorflow_model_server"]
+12 -3
View File
@@ -1,6 +1,15 @@
#!/bin/bash
if [ "$1" = 'tensorflow_model_server' ]; then
exec tensorflow_model_server --port=8500 --rest_api_port=8501 \
--model_name=${MODEL_NAME} --model_base_path=${MODEL_BASE_PATH}/${MODEL_NAME}
fi
if [ "${1#-}" != "$1" ]; then
set -- tensorflow_model_server --port=8500 --rest_api_port=8501 \
--model_name=${MODEL_NAME} --model_base_path=${MODEL_BASE_PATH}/${MODEL_NAME} "$@"
fi
exec "$@"
~
tensorflow_model_server --port=8500 --rest_api_port=8501 \
--model_name=${MODEL_NAME} --model_base_path=${MODEL_BASE_PATH}/${MODEL_NAME} \
"$@"