Serving: how to compile serving-1.8 with gpu

Created on 18 Jul 2018  路  2Comments  路  Source: tensorflow/serving

i am a beginners of tf serving. i use bazel to compile 1.8.0 with this cmd:
bazel build -c opt --config=cuda tensorflow_serving/....
but return errors:
ERROR: Building with --config=cuda but TensorFlow is not configured to build with GPU support. Please re-run ./configure and enter 'Y' at the prompt to build with GPU support. ERROR: no such target '@local_config_cuda//crosstool:toolchain': target 'toolchain' not declared in package 'crosstool' defined by /root/.cache/bazel/_bazel_admin/35146bfcb793e1046821f2a1840cca65/external/local_config_cuda/crosstool/BUILD.
other developers tell me i should run ./configure to set gpu. But i just know how to set gpu before 1.5.0 in the directory "tensroflow". In version 1.8.0, i can't find directory "tensroflow" in this project and i can't find tf serving tutorial to compile with gpu. So, how to set gpu in version 1.8.0

builinstall

Most helpful comment

@lylalala

try export TF_NEED_CUDA="1" before build serving with bazel.

All 2 comments

Please see the Dockerfile.devel-gpu for an example of how to build with GPU support. You can also grab a prebuilt docker image that builds the GPU build here: https://hub.docker.com/r/tensorflow/serving/tags/

@lylalala

try export TF_NEED_CUDA="1" before build serving with bazel.

Was this page helpful?
0 / 5 - 0 ratings