1. 开启Docker容器
Docker 配置方法见 https://www.yuque.com/jarvis73/pukm54/rwfl73
docker run -t -p 8501:8501 -p 8500:8500 -v "D:/0WorkSpace/Project/model_dir/tag/export:/models/tag" -e MODEL_NAME=tag tensorflow/serving &
8501 是 REST API
- 8500 是 gRPC API
2. REST API
模型状态API
GET http://host:port/v1/models/${MODEL_NAME}[/versions/${MODEL_VERSION}]
# Example: http://localhost:8501/v1/models/tag
# Example: http://localhost:8501/v1/models/101_unetinter_v10/versions/0
模型元数据API
GET http://host:port/v1/models/${MODEL_NAME}[/versions/${MODEL_VERSION}]/metadata
# Example: http://localhost:8501/v1/models/tag/metadata
# Example: http://localhost:8501/v1/models/tag/versions/0/metadata