編譯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