dockertensorflowtensorflow-serving

Run docker container Error: Could not find base path /models/model for servable model


Im have problem when I've trying to run a docker container using docker image: tensorflow/serving.

  1. I run the cmd:

docker run --name=tf_serving -it tensorflow/serving

  1. The result is:
2019-10-28 04:23:56.858540: I tensorflow_serving/model_servers/server_core.cc:462] Adding/updating models.
2019-10-28 04:23:56.858571: I tensorflow_serving/model_servers/server_core.cc:573]  (Re-)adding model: model
2019-10-28 04:23:56.858852: E tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:362] FileSystemStoragePathSource encountered a filesystem access error: Could not find base path /models/model for servable model

I've digging to resolve it but still there. Could anyone please have any idea for this, thanks so much!


Solution

  • I found the solution, for someone who has the same problems, we need to provide the model path in the local computer and in docker:

    docker run --name=the_name -p 9000:9000 -it -v "/path_to_the_model_in_computer:/path_to_model_in_docker" tensorflow/serving:1.15.0 --model_name=MODEL_NAME --port=9000