Bazel 测试构建失败

Bazel test build fails

我正在使用 anaconda 环境。用于构建洋红色,并按照 README

中的安装步骤进行操作

在 运行 命令之后

bazel test //magenta/...

它说

Executed 5 out of 5 tests: 5 fail locally

test.log如下

Traceback (most recent call last):
File "/home/ff/.cache/bazel/_bazel_ff/e20bdd5a13b0197259100b3aae16dd49/execroot/magenta/bazel-out/local-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences_test.runfiles/__main__/magenta/scripts/convert_midi_dir_to_note_sequences_test.py", line 20, in <module>
import tensorflow as tf
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory

在同一目录中,如果我尝试在 python cmd 中导入 tensorflow,

import tensorflow
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so.4 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally

我做错了什么?

解决方案(如issue)) helped. The error was that the programs were not able to find cuda libraries. So installing "cuda-ld-conf" library中所述解决了问题。