在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映像也是最新版本。
答案 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 &