gpt4 book ai didi

docker - TensorFlow通过docker服务多个模型

转载 作者:行者123 更新时间:2023-12-02 18:21:10 25 4
gpt4 key购买 nike

我无法通过Windows 10计算机上的docker通过TensorFlow Serving运行2个或更多模型。

我做了一个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个文件夹 ukpred2ukpred3是从受过训练的模型中导出的文件夹,即 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)才能运行。在此期间,您可以使用图像tensorflow / serving:night或tensorflow / serving:1.11.0-rc0

关于docker - TensorFlow通过docker服务多个模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52317028/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com