编译TensorFlow-serving GPU版本


编译TensorFlow-serving GPU版本

TensorFlow Serving 介绍

编译GPU版本

  1. 下载源码
    git clone https://github.com/tensorflow/serving.git
  2. 创建镜像
    nvidia-docker build --pull -t $USER/tensorflow-serving-devel -f serving/tensorflow_serving/tools/docker/Dockerfile.devel-gpu .
  3. 创建并进入容器
  4. 下载TensorFlow源码
    git clone https://github.com/tensorflow/tensorflow
    cd tensorflow
    git checkout v1.8.0 #检出v1.8.0
    ./configure
  5. 修改代码
    vi tensorflow_serving/util/net_http/client/testing/BUILD
    vi tensorflow_serving/util/net_http/server/testing/BUILD
    添加cc_binary( ... linkopts = ["-lm"], )
    https://github.com/tensorflow/serving/issues/971
  6. 编译
    cd ..
    bazel build -c opt --config=cuda tensorflow_serving/...


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM