Tensorflow Server - GlobalMediaBridge/cosmetic-server GitHub Wiki

https://yjucho1.github.io/tensorflow/tensorflow-serving/ https://www.tensorflow.org/guide/saved_model https://github.com/tensorflow/serving/blob/master/tensorflow_serving/tools/docker/Dockerfile

ํ…์„œํ”Œ๋กœ์šฐ๋กœ ์ž‘์„ฑ๋œ ๋ชจ๋ธ์„ ์ €์žฅ

tf.saved_model.save(๋ชจ๋ธํด๋ž˜์Šค, ๊ฒฝ๋กœ)

ํ•ด๋‹น ๊ฒฝ๋กœ์— pbํŒŒ์ผ์ด ์ƒ์„ฑ๋จ

๋ช…๋ น์„ ํ†ตํ•ด tensorflow server๋กœ ๋ฐฐํฌ

nohup tensorflow_model_server \
  --rest_api_port=8501 \
  --model_name=mobilenet \
  --model_base_path="/tmp/mobilenet" >server.log 2>&1
tensorflow_model_server \
 --model_base_path=/keras-and-tensorflow-serving/my_image_classifier \
 --rest_api_port=9000 --model_name=ImageClassifier
tensorflow_model_server --port=8500 --rest_api_port=8501 \
--model_name=${MODEL_NAME} --model_base_path=${MODEL_BASE_PATH}/${MODEL_NAME} \
"$@"' > /usr/bin/tf_serving_entrypoint.sh \
&& chmod +x /usr/bin/tf_serving_entrypoint.sh

๋ฐฐํฌ ๋œ ๊ณณ์˜ ์ฃผ์†Œ http://localhost:<--rest_api_port>/v1/models/<--model_name>:predict