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. 纯JS判断各种浏览器类型及版本.

    IE11或者非IE if (!document.all) { alert('IE11+ or not IE'); } IE10 if (document.all && document ...

  2. Arcgis, ArcEngine, Arcgis Server使用开发汇总 索引

    ArcGIS系列软件license及安装: Arcgis SDE10.1 和 Arcgis server10.1的授权文件license tnt_esri.dat Arcgis8.1安装license ...

  3. Unity游戏开发中的内存管理_资料

    内存是手游的硬伤——Unity游戏Mono内存管理及泄漏http://wetest.qq.com/lab/view/135.html 深入浅出再谈Unity内存泄漏http://wetest.qq.c ...

  4. SqlServer批量刷数据执行事务回滚语句备份

    企业进行对数据库执行刷数据工作,一段很长的语句希望同时成功或者失败时用到. 1.建立测试环境 /**************************************************** ...

  5. PHP中Exception异常

    异常的基本使用 当异常被抛出时,其后的代码不会继续执行,PHP 会尝试查找匹配的 "catch" 代码块. 如果异常没有被捕获,而且又没用使用 set_exception_hand ...

  6. jQuery中Animate进阶用法(一)

    jQuery中animate的用法你了解多少呢?如果仅仅是简单的移动位置,显示隐藏,哦!天哪你在浪费资源!因为animate太强大了,你可以有很多意想不到的用法!让我们一起研究一下吧~~ 首先要了解j ...

  7. VSTO PowerPoint 代码删除Shape后再恢复出现无法再次获取的问题

    做PowerPoint的VSTO插件项目,遇到个很奇怪的问题,当代码执行删除某些Shape时,没问题,但是操作Undo也就是恢复后,无法再次获取到之前删除的对象,这种情况只在Office2007中出现 ...

  8. Lua在单片机中的移植

    Lua代码符合ANSI C标准,只要有C编译器的开发环境就能跑Lua. 虽说只要有C编译器就能跑Lua,但是单片机的环境太简单,有些C标准的内容仍旧无法支持. Lua的官网是:www.lua.org ...

  9. PostgresSQL的安装与基本命令使用

    安装与配置 yum install http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-redhat95-9.5-2.noarch.rpm ...

  10. HTML5本地存储

    之前对这个还不太熟悉,项目中在账号登录时,获取账号的信息,存储在本地然后随时调用//存储localStorage.setItem('data',值); //获取var information = lo ...