【发布时间】:2020-08-06 13:16:09
【问题描述】:
我是 TensorFlow 的新手(使用 1.13)并尝试构建 TF 模型并在 docker 张量流模型服务器上提供它。 我已经导出了我的模型,安装了 docker 并使用以下命令启动了我的 docker 容器:
docker run -p 8501:8501 --name SN_TFlow
--mount type=bind,source=/tmp/service_model/export,target=/models
-e MODEL_NAME=1596551653 -t tensorflow/serving &
我可以看到我的容器正在运行,并且客户端中的行:“I tensorflow_serving/model_servers/server.cc:375] Exporting HTTP/REST API at:localhost:8501 ...”似乎表明一切都已启动并且按照文档运行。
但是,当我尝试使用 curl 命令测试我的模型时: $ curl -d '{"test_value": [40]}' \ -X POST http://localhost:8501/1/models/1596551653:predict
我收到一条消息说: URL 错误/非法格式或缺少 URL 无法解析主机 POST 我收到一条 404 消息。
我也试过简单地 curl http://localhost:8501/models/1/1596551653 但也找不到。 知道我缺少什么吗?谢谢
【问题讨论】:
标签: docker tensorflow tensorflow-serving