Я не могу запустить 2 или более моделей через службу TensorFlow через докер на машине с Windows 10.
Я сделал файл models.config
model_config_list: {
config: {
name: "ukpred2",
base_path: "/models/my_models/ukpred2",
model_platform: "tensorflow"
},
config: {
name: "model3",
base_path: "/models/my_models/ukpred3",
model_platform: "tensorflow"
}
}
docker run -p 8501:8501 --mount type=bind,source=C:\Users\th3182\Documents\temp\models\,target=/models/my_models --mount type=bind,source=C:\Users\th3182\Documents\temp\models.config,target=/models/models.config -t tensorflow/serving --model_config_file=/models/models.config
В C:\Users\th3182\Documents\temp\models
есть 2 папки ukpred2
и ukpred3
, в этих папках находятся экспортированные папки из обученных моделей, т.е. 1536668276
, который содержит папку assets
, папку variables
и файл saved_model.ph
.
Я получаю ошибку
2018-09-13 15:24:50.567686: I tensorflow_serving/model_servers/main.cc:157] Building single TensorFlow model file config: model_name: model model_base_path: /models/model
2018-09-13 15:24:50.568209: I tensorflow_serving/model_servers/server_core.cc:462] Adding/updating models.
2018-09-13 15:24:50.568242: I tensorflow_serving/model_servers/server_core.cc:517] (Re-)adding model: model
2018-09-13 15:24:50.568640: 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 /models/model for servable model
Кажется, я не могу заставить это работать с изменениями выше. Но мне удалось запустить одну модель на сервер с помощью следующей команды
docker run -p 8501:8501 --mount type=bind,source=C:\Users\th3182\Documents\projects\Better_Buyer2\model2\export\exporter,target=/models/model2 -e MODEL_NAME=model2 -t tensorflow/serving
Вам придется дождаться следующего выпуска (1.11.0), чтобы это сработало. Тем временем вы можете использовать изображение tenorflow / serve: nightly или tensorflow / serve: 1.11.0-rc0.