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. 修改github.com域名解析

    http://ping.chinaz.com/  首先在这个网站查询 github.com 然后选择ping速度最好的IP地址 将其填充到hosts文件中.win7路径:C:\Windows\Syst ...

  2. web前端基础知识-(六)Django基础

    上面我们已经知道Python的WEB框架有Django.Tornado.Flask 等多种,Django相较与其他WEB框架其优势为:大而全,框架本身集成了ORM.模型绑定.模板引擎.缓存.Sessi ...

  3. C++类成员在内存中的存储及对齐方式

    前言:数据对齐的基本理论参见文章:http://www.cnblogs.com/MyBlog-Richard/articles/5993448.html 一.空类的大小 C++中空类的大小是1,这是因 ...

  4. phpcms 添加memcache支持

    1,修改caches/configs/cache.php <?php return array ( 'file1' => array ( 'type' => 'file', 'deb ...

  5. TCP学习之二:客户端与服务端的连接

    主要参考张子阳大神的博客:http://www.cnblogs.com/JimmyZhang/category/101698.html TcpClient是对Socket的封装 一个TcpClient ...

  6. manacher算法专题

    一.模板 算法解析:http://www.felix021.com/blog/read.php?2040 *主要用来解决一个字符串中最长回文串的长度,在O(n)时间内,线性复杂度下,求出以每个字符串为 ...

  7. 关于Block的简单使用

    Block在整个iOS开发中无所不见,很重要,很重要,文本在这里block的简单使用介绍.我们可以简单地定义.使用block. 1. Block和C的指针函数很像,但比C的函数灵活多了.废话了.... ...

  8. ArrayList和HashSet的Contains()方法(转)

    来源: ArrayList和HashSet的Contains()方法 笔试题: package com.champion.test.exam; import java.util.ArrayList; ...

  9. Python 3.x 连接数据库(pymysql 方式)

    ==================pymysql=================== 由于 MySQLdb 模块还不支持 Python3.x,所以 Python3.x 如果想连接MySQL需要安装 ...

  10. Js计算当前日,当前周开始结束时间,当前月份,当前年份

    <script type="text/javascript"> //日期加上天数后的新日期. function GetDateStr(AddDayCount) { va ...