Tensor Flow服务docker无效字段

时间:2018-10-02 15:00:31

标签: docker tensorflow tensorflow-serving

在tensorflow模型服务器[https://www.tensorflow.org/serving/docker](Serving示例部分)中运行示例示例时

docker run -p 8501:8501 --mount type=bind, source=serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_two_cpu, target=/models/half_plus_two -e MODEL_NAME=half_plus_two -t tensorflow/serving &

出现以下错误

invalid argument "type=bind," for "--mount" flag: invalid field '' must be a key=value pair See 'docker run --help'. [1]+ Exit 125

docker --version提供 Docker版本18.06.1-ce

模型服务器docker映像也是最新版本。

1 个答案:

答案 0 :(得分:6)

该命令的逗号后不能有空格。

docker run -p 8501:8501 --mount type=bind,source=serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_two_cpu,target=/models/half_plus_two -e MODEL_NAME=half_plus_two -t tensorflow/serving &