简体   繁体   English

Bazel测试构建失败

[英]Bazel test build fails

I'm using anaconda env. 我正在使用anaconda env。 for building magenta, and followed the installation steps as per the README 用于构建洋红色,并按照自述文件执行安装步骤

After running the command 运行命令后

bazel test //magenta/...

it says 它说

Executed 5 out of 5 tests: 5 fail locally 5个测试中执行5个:本地失败5个

The test.log is as follows 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

In the same directory, if I try to import tensorflow in python cmd, 在同一目录中,如果我尝试在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

What am I doing wrong? 我究竟做错了什么?

The solution (as explained in an issue )) helped. 解决方案(如问题所述 )很有帮助。 The error was that the programs were not able to find cuda libraries. 错误是程序无法找到cuda库。 So installing "cuda-ld-conf" library solved the problem. 因此,安装“ cuda-ld-conf”库可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM