Search code examples
dockertensorflowtensorflow-serving

Tensor flow serving docker invalid field


When running the sample example in tensorflow model server [https://www.tensorflow.org/serving/docker](Serving example part)

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 & 

the following error comes

See 'docker run --help'.
[1]+  Exit 125 

docker --version gives Docker version 18.06.1-ce

The model server docker image is the latest version as well.


Solution

  • The command shouldn't have spaces after the commas.

    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 &