serving: no such target '@org_tensorflow//third_party/gpus/crosstool:crosstool'
I am trying to compile tensorflow_model_server from master.
Error:
ERROR: no such target '@org_tensorflow//third_party/gpus/crosstool:crosstool': target 'crosstool' not declared in package 'third_party/gpus/crosstool' defined by /home/username/.cache/bazel/_bazel_jorge/2fd988219920b10e9ede8d3b5720f3d2/external/org_tensorflow/third_party/gpus/crosstool/BUILD.
Steps to reproduce:
- Configure tensorflow with CUDA support
cd tensorflow
./configure
cd ..
- Build //tensorflow_serving/model_servers:tensorflow_model_server
bazel build -c opt --config=cuda --genrule_strategy=standalone --spawn_strategy=standalone --verbose_failures //tensorflow_serving/model_servers:tensorflow_model_server
As a side note when I try to compile tensorflow_model_server from an external project it works but doesn’t have support for the GPU.
The solutions of https://github.com/tensorflow/serving/issues/225 don’t work
EDITED: finally I made this script in order to compile it with CUDA support: https://gist.github.com/jorgemf/0f2025a45e1568663f4c20551a5881f1
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (1 by maintainers)
I was able to make it compile. Here is an script to do it so: https://gist.github.com/jorgemf/0f2025a45e1568663f4c20551a5881f1
You only need to modify the variables and the exports with the values you want and everything works.
It works because:
./configuredoesn’t export and they are not visible when compiling TensorFlow Servingserving/tools/bazel.rcthe you have to replace@org_tensorflow//third_party/gpus/crosstoolwith@local_config_cuda//crosstool:toolchainserving/tensorflow/third_party/gpus/cuda_configure.bzlwhen it is available-c opt --config=cuda --spawn_strategy=standaloneas options to compile//tensorflow_serving/model_servers:tensorflow_model_serverbut it should work for other targets@jorgemf Success - I now have a tf-model_server that does indeed use the GPU. To get there I used:
Thanks again for providing the script!