由于某些VPC限制,我被迫使用自定义容器来预测在Tensorflow上训练的模型。根据文档需求,我使用Tensorflow服务创建了一个HTTP服务器。用于build映像的Dockerfile如下所示:
FROM tensorflow/serving:2.4.1-gpu
# copy the model file
ENV MODEL_NAME=my_model
COPY my_model /models/my_model其中,my_model在名为1/的文件夹中包含saved_model。
然后,我将此映像推送到,然后使用Import an existing custom container并将Port更改为8501创建了一个Port。但是,当尝试使用n1-standard-16和1 P100 GPU类型的单个计算节点将模型部署到端点时,部署会遇到以下错误:
Failed to create session: Internal: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version我想不出这是怎么回事。我能够在本地机器上运行相同的码头映像,并且能够通过命中创建的端点:http://localhost:8501/v1/models/my_model:predict成功地获得预测。
如能提供任何帮助,我们将不胜感激。
发布于 2021-04-02 07:23:14
通过将https://www.tensorflow.org/tfx/guide/serving图像降级为2.3.0-gpu版本已经解决了这个问题。根据错误上下文,自定义模型图像中的CUDA驱动程序与GCP AI平台培训集群中合适的驱动程序版本不匹配。
https://stackoverflow.com/questions/66900259
复制相似问题