Error response:/usr/bin/tf_serving_entrypoint.sh: line 3: 6 Illegal instruction (core dumped) ...
用docker部署tensorflow-serving:gpu时,参照官方文档:https://tensorflow.google.cn/tfx/serving/docker
本应该是很简单的部署,没想到会一直出现这个错误:

经过github和网上的一个朋友了解到,关键问题可能是服务器机器的cpu比较弱(原来是我的cpu确实比较弱:我是在服务器分出来的一个虚拟机上部署的,本质是一个虚拟机,不是一个实体机。)
我的解决方式:将虚拟机更换为实体机,从服务器上直接分出一块CPU供部署使用,然后就解决了这个问题。

疑问:从github中的那位朋友下面的描述看出,即使不更换cpu,似乎也能从别的方法来解决这个问题:我们上面的部署是直接pull 镜像: docker pull tensorflow/serving:latest-gpu
我是通过github文档中获取的方法:https://github.com/tensorflow/serving/blob/master/tensorflow_serving/tools/docker/Dockerfile.gpu
不是直接拉取 tensorflow/serving:latest-gpu这个镜像文件,而是通过Dockerfile.gpu,自己"做"一个镜像文件,然后拉取
1.Clone the TensorFlow Serving project
git clone https://github.com/tensorflow/serving
cd serving
2.Build an image with an optimized ModelServer
For CPU: docker build --pull -t $USER/tensorflow-serving-devel \
-f tensorflow_serving/tools/docker/Dockerfile.devel .
For GPU: docker build --pull -t $USER/tensorflow-serving-devel-gpu \
-f tensorflow_serving/tools/docker/Dockerfile.devel-gpu .
3.Build a serving image with the development image as a base
For CPU: docker build -t $USER/tensorflow-serving \
--build-arg TF_SERVING_BUILD_IMAGE=$USER/tensorflow-serving-devel \
-f tensorflow_serving/tools/docker/Dockerfile .
For GPU: docker build -t $USER/tensorflow-serving-gpu \
--build-arg TF_SERVING_BUILD_IMAGE=$USER/tensorflow-serving-devel-gpu \
-f tensorflow_serving/tools/docker/Dockerfile.gpu . # Your new optimized Docker image is now$USER/tensorflow-serving-gpu, which you can use just as you would the standardtensorflow/serving:latest-gpuimage.
注意:Dockerfile.gpu这个文件里:要注意里面的CUDA,cuDNN,tensorRT,MODEL_NAME,BASE_PATH_MODEL等这些参数要一一对应好(在服务器上安装好)
第2步和第3步的时间比较长,需要耐心等待一下。
然后执行:
sudo docker image ls
就可以查看到新拉取的镜像信息:$USER/tensorflow/serving-gpu:latest 大小为2.4G左右吧(我用的是这个)
然后打开容器:
docker run --runtime=nvidia -p 8501:8501 \
--mount type=bind,\
source=/tmp/tfserving/serving/tensorflow_serving/servables/tensorflow/testdata/saved_model_half_plus_two_gpu,\
target=/models/half_plus_two \
-e MODEL_NAME=half_plus_two -t tensorflow/serving:latest-gpu & 注意:我标红的镜像要修改了,改为:$USER/tensorflow/serving-gpu:latest(每个人不一样)
然后执行之后,显示模型获取成功了,但是出现了关于CUDA的一些问题,其实这个问题我到现在还没有解决,然后哪位朋友知道了这个如何解决,能不能告诉我一下,在下方留言和我说说呗。

Error response:/usr/bin/tf_serving_entrypoint.sh: line 3: 6 Illegal instruction (core dumped) ...的更多相关文章
- httpd: config error '*.php:/usr/bin/php-cgi' in '/etc/httpd.conf'
/********************************************************************************* * httpd: config e ...
- Mac 无法安装安装psutil 报错 error: command '/usr/bin/clang' failed with exit status 1
psutil是一个特别好用来检查系统资源的一个包, 但是 在Mac安装却总是报错 查看监控系统脚本, 点这里 mac系统版本: Macos Mojave 10.14.3 报错信息如下: WARNING ...
- python报错使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: SyntaxError: invalid syntax问题
参考链接:https://blog.csdn.net/ltz150/article/details/77870735 1.背景: CentOS 7升级Python到3.6.2后,需要在/usr/bin ...
- 执行sh脚本报“/usr/bin/env: "sh\r": 没有那个文件或目录”错误
出现这个错误的原因是出错的语句后面多了“\r”这个字符,换言之,脚本文件格式的问题,我们只需要把格式改成unix即可: vi xx.sh :set ff :set ff=unix :wq!
- sublime Error executing: /usr/bin/security dump-trust-settings -d
sublime text2突然crash,无法简单粗暴的关闭,就开始认真解决这个问题. 问题: 参考文献:https://github.com/wbond/package_control/issues ...
- tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory
将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题: # ./shutdown.sh Using CATALINA_BASE: /usr/local/tomcat ...
- tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory(转)
原文:https://blog.csdn.net/reblue520/article/details/52588825 将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题 ...
- 【转】“/usr/bin/ld: cannot find -lz”
原文网址:http://stackoverflow.com/questions/3373995/usr-bin-ld-cannot-find-lz I am trying to compile And ...
- #!/usr/bin/env 脚本解释程序的作用
the Zimbu programming language http://www.zimbu.org/getting-started -------------------------------- ...
随机推荐
- cmd释放重新获取IP
1.打开电脑的命令提示符运行设置窗口之后,我们收入 ipconfig/release ,然后点击回车键 ,释放之前获取的IP地址 2.释放之前的IP地址之后,我们在输入 ipconfig/re ...
- 如何使用css伪类,实现div左上角出现封面等提示信息
HTML <div class="ui-cover-tip”><div> CSS .ui-cover-tip{ position: relative; width: ...
- 1)session总结
(1)session的由来: HTTP协议是一种无状态协议,服务器响应完之后就失去了与浏览器的联系,最早,Netscape将cookie引入浏览器,使得数据可以客户端跨页面交换,那么服务器是如何记住众 ...
- JwtUser JwtAuthenticationEntryPoint JwtAuthorizationTokenFilter JwtUserDetailsService AuthenticationController
package me.zhengjie.core.security; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok ...
- http协议和网络模型
传输层 传输层对上层应用层,提供处于网络连接中的两台计算机之间的数据传输. 在传输层有两个性质不同的协议:TCP(Transmission ControlProtocol,传输控制协议)和 UD ...
- getHibernateTemplate()的find用法大全
一.find(String queryString); 示例:this.getHibernateTemplate().find("from bean.User"); 返回所有Use ...
- Hashtable和Hashmap的区别?
1.实现的继承的父类不同 Hashtable继承Dictionary类 HashMap继承abstractMap类 两个类都实现了Map接口 2.线程安全性不同 Hashmap线程是不安全的 H ...
- JDBC源码分析(加载过程)
public static void main(String[] args) { String url = "jdbc:mysql://172.16.27.11:3306/jdbcT ...
- 关于apache的几个常见问题
一.安装apache的时候总是不成功,提示:failed to open the winnt service manager 原因:软件安装时与windows7的"用户账户控制"( ...
- 省A类竞赛二等奖--村先游项目VUE前端重构
村先游--省二竞赛项目VUE重构 源码地址: 重构前的(前端+后台):https://github.com/Archer-Fang/cunxianyou 重构前的(前端):https://github ...