Created
December 10, 2019 12:27
-
-
Save fai555/8d4520106a22821297dfbfd21e8dfc2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # absolute path to the directory where label_map.pbtxt and input image files are. It must be an absolute path. Docker volume mounting doesn't work with relative path. All other paths in this scripts will work with relative path. | |
| export VOLUME_PATH="" | |
| export SERVER_URL="http://EXTERNAL_IP:8500/v1/models/mnist:predict" | |
| # relative path to the test image. i.e. config/image1.jpg. The path is relative to VOLUME_PATH | |
| export IMAGE_PATH="" | |
| # relative path to the output json. i.e. config/out_image1.json. The path is relative to VOLUME_PATH | |
| export OUTPUT_JSON="" | |
| # relative path to the label_map.pbtxt. i.e. config/label_map.pbtxt. The path is relative to VOLUME_PATH | |
| export LABEL_MAP="" | |
| # Specify True if you want to save the output image. | |
| export SAVE_OUTPUT_IMAGE=True | |
| # You can use the publicly available docker image or use your own image | |
| export DOCKER_IMAGE_NAME="asia.gcr.io/im-mlpipeline/tensorflow-serving-sidecar-client:latest" | |
| docker run -it -v ${VOLUME_PATH}:/app/tensorflow-serving_sidecar/config -t ${DOCKER_IMAGE_NAME} client.py --server_url=${SERVER_URL} --image_path=${IMAGE_PATH} --output_json=${OUTPUT_JSON} --save_output_image=${SAVE_OUTPUT_IMAGE} --label_map=${LABEL_MAP} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment