Tensorflow serving的编译
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的编译的更多相关文章
- tensorflow serving GPU编译问题
编译gpu版本:bazel build -c opt --config=cuda --spawn_strategy=standalone //tensorflow_serving/model_serv ...
- Tensorflow r1.12及tensorflow serving r1.12 GPU版本编译遇到的问题
1.git clone tensorflow serving 及tensorflow代码 2. ERROR: /root/.cache/bazel/_bazel_root/f71d782da17fd8 ...
- 学习笔记TF067:TensorFlow Serving、Flod、计算加速,机器学习评测体系,公开数据集
TensorFlow Serving https://tensorflow.github.io/serving/ . 生产环境灵活.高性能机器学习模型服务系统.适合基于实际数据大规模运行,产生多个模型 ...
- tensorflow serving
1.安装tensorflow serving 1.1确保当前环境已经安装并可运行tensorflow 从github上下载源码 git clone --recurse-submodules https ...
- Tensorflow Serving 模型部署和服务
http://blog.csdn.net/wangjian1204/article/details/68928656 本文转载自:https://zhuanlan.zhihu.com/p/233614 ...
- tensorflow serving 编写配置文件platform_config_file的方法
1.安装grpc gRPC 的安装: $ pip install grpcio 安装 ProtoBuf 相关的 python 依赖库: $ pip install protobuf 安装 python ...
- 基于TensorFlow Serving的深度学习在线预估
一.前言 随着深度学习在图像.语言.广告点击率预估等各个领域不断发展,很多团队开始探索深度学习技术在业务层面的实践与应用.而在广告CTR预估方面,新模型也是层出不穷: Wide and Deep[1] ...
- Tensorflow Serving介绍及部署安装
TensorFlow Serving 是一个用于机器学习模型 serving 的高性能开源库.它可以将训练好的机器学习模型部署到线上,使用 gRPC 作为接口接受外部调用.更加让人眼前一亮的是,它支持 ...
- TensorFlow Serving简介
一.TensorFlow Serving简介 TensorFlow Serving是GOOGLE开源的一个服务系统,适用于部署机器学习模型,灵活.性能高.可用于生产环境. TensorFlow Ser ...
随机推荐
- 常用的js方法,包括表单校验的一些方法
/** * 对JSON对象转换为字符串. * @param {json对象} json * @return {json字符串} */ function jsonObj2Str(json) { var ...
- String、StringBuffer与StringBuilder之间区别
关于这三个类在字符串处理中的位置不言而喻,那么他们到底有什么优缺点,到底什么时候该用谁呢?下面我们从以下几点说明一下 1.三者在执行速度方面的比较:StringBuilder > String ...
- Yii2.0 对的一些简单的操作
1: 此方法返回 ['name' => 'daxia'] 的所有数据: User::find()->where(['name' => 'daxia'])->all(); 2: ...
- List接口方法使用(PS:Java 编程思想阅读小结)
1.用代码说话 package JavaProject; import java.util.*; public class A{ public static void main(String[]arg ...
- 第一章 Shiro简介——《跟我学Shiro》(转)
目录贴:跟我学Shiro目录贴 1.1 简介 Apache Shiro是Java的一个安全框架.目前,使用Apache Shiro的人越来越多,因为它相当简单,对比Spring Security,可 ...
- Windows无法完成安装,若要在此计算机上安装Windows,请中心启动安装。
现在安装系统已经很简单了,我觉得U盘启动的话两步就差不多了, 壹:设置BIOS,将U盘启动作为系统默认启动选项 贰:直接进去大白菜之类的,一键安装... 今天终于看到第三部了, 报错:Windows无 ...
- 配置tomcat系统日志--java eclipse
控制台那里的日志只是部分,有时候报错了我们并没有显示出来,所以需要找到系统日志... 双击tomcat v.80 Service---点击open lauch Configuration--Argum ...
- dom4j的小例子
1.要解析的xml文件book.xml <?xml version="1.0" encoding="UTF-8"?> <books> & ...
- STL
STL qsort intcompare(constvoid*arg1,constvoid*arg2){ return(*(int*)arg1<*(int*)arg2)?-1: (*(int*) ...
- JavaScript数组去重
第一种方法: 思路: 1.创建一个新的数组存放结果 2.创建一个空对象, 3.将数组中的元素作为空对象的属性并对其赋值,每次取出一个元素与对象进行对比,然后到对象中去访问这个属性, 如果能访问到值,则 ...