Reputation: 23
I am trying to run the tensorflow/serving docker image with the config file. It throws error regarding file-system access for servable. I tried with single model and multiple model both are not working.
The docker execution command is as follows
sudo docker run -p 8501:8501 --mount type=bind,source=/home/projects/models/model1/,target=/models/model1 --mount type=bind,source=/home/projects/models/model2/,target=/models/model2 --mount type=bind,source=/home/projects/config.conf,target=/models/config.conf -t tensorflow/serving --model_config_file=/models/config.conf
"E tensorflow_serving/sources/storage_path/file_system_storage_path_source.cc:369] FileSystemStoragePathSource encountered a file-system access error: Could not find base path /home/projects/models/model1/ for servable model1
"
My config file is as below
model_config_list {
config {
name: 'model1',
base_path: '/home/projects/models/model1/',
model_platform: 'tensorflow'
}
config {
name: 'model2',
base_path: '/home/projects/models/model2/',
model_platform: "tensorflow"
}
}
But without using config file I can run the models individually using docker command.
sudo docker run -t --rm -p 8501:8501 -v "/home/projects/models/model1:/models/model1" -e MODEL_NAME=model1 tensorflow/serving &
Upvotes: 1
Views: 708
Reputation: 757
There's no need to mount each models separately! You can mount all the models like this:
sudo docker run \
-p 8501:8501 \
--mount type=bind,source=/home/projects/models/,target=/models/ \
-t tensorflow/serving \
--model_config_file=/models/config.conf
and your config.conf
file now looks like this (put this file under /home/projects/models/
):
model_config_list {
config {
name: 'model1',
base_path: '/models/model1',
model_platform: 'tensorflow'
},
config {
name: 'model2',
base_path: '/models/model2',
model_platform: "tensorflow"
},
}
Upvotes: 1