Tensorflow serving提供了部署tensorflow生成的模型给线上服务的方法,包括模型的export,load等等。

安装参考这个

https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/setup.md

但是由于被qiang的问题 (googlesource无法访问)

https://github.com/tensorflow/serving/issues/6

需要修改一下 WORKSPACE文件

new_http_archive(

name = "gmock_archive",

#url = "https://googlemock.googlecode.com/files/gmock-1.7.0.zip",

url = "https://github.com/peter-wangxu/gmock/archive/1.7.0.zip",

#sha256 = "26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b",

sha256 = "9b0018413f4222b8ee5454a431918c324d010062eecb078677b6897d0c76bc42",

build_file = "tensorflow/google/protobuf/gmock.BUILD",

)

git_repository(

name = "boringssl_git",

#commit = "436432d849b83ab90f18773e4ae1c7a8f148f48d",

commit = "db0729054d5964feab9e60089ba2d06a181e78b1",

init_submodules = True,

#remote = "https://github.com/mdsteele/boringssl-bazel.git",

remote = "https://github.com/doubler/boringssl-bazel.git",

)

最近发现一个付费vpn,但是更方便一些,免得修改了。。

http://www.lvdou888.com/intro/  绿豆vpn 挺好用 我在win下开启 可以再ubuntu下面命令行执行bazel 什么访问畅通了。。  还是很赞

注意需要先进入tensorflow路径

./configure一下

bazel build tensorflow_serving/…

最后验证一下

./bazel-bin/tensorflow_serving/example/mnist_inference --port=9000 ~/tmp/

I tensorflow_serving/session_bundle/session_bundle.cc:109] Attempting to load a SessionBundle from: /home/gezi/tmp/

E tensorflow_serving/example/mnist_inference.cc:190] Fail to load tensorflow export: /home/gezi/tmp/export.meta

gezi:~/other/serving$ bazel test tensorflow_serving/...

WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.

INFO: Found 89 targets and 36 test targets...

INFO: Elapsed time: 31.664s, Critical Path: 28.86s

//tensorflow_serving/batching:batch_scheduler_test PASSED in 0.3s

//tensorflow_serving/batching:retrier_test PASSED in 0.2s

//tensorflow_serving/batching:streaming_batch_scheduler_test PASSED in 4.1s

//tensorflow_serving/batching/test_util:puppet_batch_scheduler_test PASSED in 0.2s

//tensorflow_serving/core:availability_helpers_test PASSED in 0.3s

//tensorflow_serving/core:dynamic_manager_benchmark PASSED in 28.5s

//tensorflow_serving/core:dynamic_manager_test PASSED in 0.3s

//tensorflow_serving/core:eager_load_policy_test PASSED in 0.2s

Tensorflow serving的编译的更多相关文章

  1. tensorflow serving GPU编译问题

    编译gpu版本:bazel build -c opt --config=cuda --spawn_strategy=standalone //tensorflow_serving/model_serv ...

  2. Tensorflow r1.12及tensorflow serving r1.12 GPU版本编译遇到的问题

    1.git clone tensorflow serving 及tensorflow代码 2. ERROR: /root/.cache/bazel/_bazel_root/f71d782da17fd8 ...

  3. 学习笔记TF067:TensorFlow Serving、Flod、计算加速,机器学习评测体系,公开数据集

    TensorFlow Serving https://tensorflow.github.io/serving/ . 生产环境灵活.高性能机器学习模型服务系统.适合基于实际数据大规模运行,产生多个模型 ...

  4. tensorflow serving

    1.安装tensorflow serving 1.1确保当前环境已经安装并可运行tensorflow 从github上下载源码 git clone --recurse-submodules https ...

  5. Tensorflow Serving 模型部署和服务

    http://blog.csdn.net/wangjian1204/article/details/68928656 本文转载自:https://zhuanlan.zhihu.com/p/233614 ...

  6. tensorflow serving 编写配置文件platform_config_file的方法

    1.安装grpc gRPC 的安装: $ pip install grpcio 安装 ProtoBuf 相关的 python 依赖库: $ pip install protobuf 安装 python ...

  7. 基于TensorFlow Serving的深度学习在线预估

    一.前言 随着深度学习在图像.语言.广告点击率预估等各个领域不断发展,很多团队开始探索深度学习技术在业务层面的实践与应用.而在广告CTR预估方面,新模型也是层出不穷: Wide and Deep[1] ...

  8. Tensorflow Serving介绍及部署安装

    TensorFlow Serving 是一个用于机器学习模型 serving 的高性能开源库.它可以将训练好的机器学习模型部署到线上,使用 gRPC 作为接口接受外部调用.更加让人眼前一亮的是,它支持 ...

  9. TensorFlow Serving简介

    一.TensorFlow Serving简介 TensorFlow Serving是GOOGLE开源的一个服务系统,适用于部署机器学习模型,灵活.性能高.可用于生产环境. TensorFlow Ser ...

随机推荐

  1. 数据结构之平衡查找树(AVL)

    AVL树的旋转操作 图解 最详细 各大教课书上讲的都是左旋与右旋,其实这样很容易理解错误,我们换一种叫法.我们称呼左旋为:逆进针旋转.我们称呼右旋为:顺进针旋转.

  2. bootstrap学习笔记--bootstrap排版类的使用

    标题 Bootstrap 中定义了所有的 HTML 标题(h1 到 h6)的样式,这个和一般的html没啥区别.请看下面的实例: <h1>测试1 h1</h1> <h2& ...

  3. php二维数组相同id的数量相加

    数组样式 $arr = array( array( , , , ), array( , , , ), array( , , , ), array( , , , ), ); 处理办法 $item=arr ...

  4. 网站设置404页面 --nginx

    有的时候根据域名要先知道用的什么web 服务器 最简单的 http://tool.chinaz.com/pagestatus/  输入域名,看返回的头部信息 用的那个web浏览器 下面的方法也是根据头 ...

  5. PHP陷阱,一些注意事项

    判断的一些注意事项 count(false) > 0 // true count(0) > 0 // true "随便一个字符串" == 0 // true " ...

  6. 锁(MySQL篇)—之MyISAM表锁

    前言 锁是计算机协调多个进程或线程并发访问某一资源的机制,在数据库中,除传统的计算资源(如CPU.RAM.I/O等)的争用以外,数据也是一种供许多用户共享的资源.如何保证数据并发访问的一致性.有效性是 ...

  7. python --> 递归 以及装饰器

    一.递归知识 函数迭套执行,逐层执行之后,满足某个条件之后就会停止执行,将return值返回上层的函数,上层函数再逐层返回,最终返回给最初始函数. 递归在斐波那契数列的应用[斐波那契数列特点:前两个数 ...

  8. json-c与树

    json是一种轻量级的数据交换格式,因为其灵巧使得其在应用层开发以及接口层开发使用的十分广泛,最常用的莫过于协议交流使用json数据,比xml轻巧,又比二进制数据有规则.无论是各大公司的开放平台或者是 ...

  9. Flash跨域传输数据 crossdomain.xml

    一.概述位于www.a.com域中的SWF文件要访问www.163.com的文件时,SWF首先会检查163服务器目录下是否有crossdomain.xml文件,如果没有,则访问不成功:若crossdo ...

  10. MySQL中的常用工具

    一.mysql 客户端连接工具 二.myisampack MyISAM表压缩工具 三.mysqladmin MySQL管理工具 四.mysqlbinlog 日志管理工具 五.mysqlcheck My ...