1, git clone tensorflow serving codes and tensorflow
2、
ERROR: /root/.cache/bazel/_bazel_root/f71d782da17fd83c84ed6253a342a306/external/local_config_cuda/crosstool/BUILD:4:1: Traceback (most recent call last): File "/root/.cache/bazel/_bazel_root/f71d782da17fd83c84ed6253a342a306/external/local_config_cuda/crosstool/BUILD", line 4 error_gpu_disabled() File "/root/.cache/bazel/_bazel_root/f71d782da17fd83c84ed6253a342a306/external/local_config_cuda/crosstool/error_gpu_disabled.bzl", line 3, in error_gpu_disabled fail("ERROR: Building with --config=c...") 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_root/f71d782da17fd83c84ed6253a342a306/external/local_config_cuda/crosstool/BUILD INFO: Elapsed time: 0.093s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded)
Solution:
export TF_NEED_CUDA="1"
3, looks ./configure configure all can not take effect, you need to configure your own variable direct all non-default path cuda, cudnn, nccl etc.
Solution: variable settings
export PATH=$PATH:/env/bazel-0.15.0/bin export TF_NEED_CUDA="1" export CUDNN_INSTALL_PATH="/usr/local/cudnn7.3_cuda9.0" export CUDA_INSTALL_PATH="/usr/local/cuda-9.0" export TF_CUDA_VERSION="9.0" export TF_CUDNN_VERSION="7" export TF_NCCL_VERSION="2.2" export NCCL_INSTALL_PATH="/env/nccl_2.2.13-1+cuda9.0_x86_64" export TEST_TMPDIR=/home
Failed to detect inconsistencies encountered nvcc cuda version and setup issues. Finally giving up, instead r1.13