編譯TensorFlow-serving GPU版本
TensorFlow Serving 介紹
編譯GPU版本
- 下載源碼
git clone https://github.com/tensorflow/serving.git - 創建鏡像
nvidia-docker build --pull -t $USER/tensorflow-serving-devel -f serving/tensorflow_serving/tools/docker/Dockerfile.devel-gpu . - 創建並進入容器
- 下載TensorFlow源碼
git clone https://github.com/tensorflow/tensorflow
cd tensorflow
git checkout v1.8.0 #檢出v1.8.0
./configure - 修改代碼
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 - 編譯
cd ..
bazel build -c opt --config=cuda tensorflow_serving/...