2

Using a Linux Ubuntu 17.10 virtual machine, I am trying to build tensorflow with GPU support. I have installed Cuda 9.2, cuDNN 7.1.4 and NCCL 2.2.13 and use the following bazel command to build tensorflow:

bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package

This is using the very useful tutorial found at:

http://www.python36.com/how-to-install-tensorflow-gpu-with-cuda-9-2-for-python-on-ubuntu/2/

However, in the comments there, no one seems to be experiencing anything similar

I then receive the following error:

Loading: Loading: 0 packages loaded ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last): File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 1142 _create_local_cuda_repository(repository_ctx) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 1014, in _create_local_cuda_repository _find_libs(repository_ctx, cuda_config) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 655, in _find_libs _find_cuda_lib("cublas", repository_ctx, cpu_value, c..., ...) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 587, in _find_cuda_lib auto_configure_fail(("Cannot find cuda library %s" %...)) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 210, in auto_configure_fail fail(("\n%sCuda Configuration Error:%...)))

Cuda Configuration Error: Cannot find cuda library libcublas.so.9.2 WARNING: Target pattern parsing failed. ERROR: error loading package 'tensorflow/tools/pip_package': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last): File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 1142 _create_local_cuda_repository(repository_ctx) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 1014, in _create_local_cuda_repository _find_libs(repository_ctx, cuda_config) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 655, in _find_libs _find_cuda_lib("cublas", repository_ctx, cpu_value, c..., ...) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 587, in _find_cuda_lib auto_configure_fail(("Cannot find cuda library %s" %...)) File "/home/conorlewis/tensorflow/third_party/gpus/cuda_configure.bzl", line 210, in auto_configure_fail fail(("\n%sCuda Configuration Error:%...)))

Cuda Configuration Error: Cannot find cuda library libcublas.so.9.2 INFO: Elapsed time: 0.974s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded) FAILED: Build did NOT complete successfully (0 packages loaded)

From the other forums i've read, people seem to say install cuda 9.0 however, doing this I get a similar error regarding not being able to find libcublas.so.9.2

Checking my cuda folder, I've found that libcublas.so exists but libcublas.so.9.2 does not. I don't know why the correct version of this file has been omitted from the installation

Any help I can get on this would be greatly appreciated.

Thanks in advance

talonmies
  • 70,661
  • 34
  • 192
  • 269
Conor
  • 51
  • 2
  • Well, if libcublas.so.9.2 is not installed, try reinstalling it. Maybe also tag the question with something related to cuda/cublas. – iga Jul 31 '18 at 20:12
  • I didn't solve the issue but I went through the tutorial again on a fresh VM and it worked perfectly. Not sure what the problem was in the end – Conor Aug 01 '18 at 13:43

0 Answers0