linux - TensorFlow from sources 问题

标签 linux tensorflow

我在 Fedora 26 发行版上

  • 内核:4.12.5
  • gcc:5.4(推荐的是 5.3.1,但我找不到它@gnu's)
  • bazel:0.5.3(which bazel 输出 /usr/local/bin/bazel)
  • 路径:.....:/usr/local/bin:.....
  • CUDA 8.0

我从 TensorFlow 的存储库中克隆了 git,运行 ./configure 并执行以下操作(仅保留基本要素):

lease specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr
Please specify the location where cuDNN 5 library is installed. Refer to README.md for more details. [Default is /usr]:/usr/local/cudnn
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: /home/elior/gcc54/bin/gcc

如果需要更多信息,请告诉我,我会发布。配置似乎现在和我运行时都已完成

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

出现以下错误

...... Cuda Configuration Error: Repository command failed find: ‘/usr/nvvm’: No such file or directory

现在我能想到的可能出错的事情很少。

  1. 使用 which nvcc 输出 /usr/bin/nvcc 但当配置询问我 CUDA 编译器的路径时我回复 /usr/bin/nvcc 它说 /usr/bin/nvcc/lib64/libcudart.so.8.0 找不到,所以我搜索了一下,我在 /找到了那个文件usr/lib64/libcudart.so.8.0 所以我将路径设置为 /usr
  2. 与 cudNN 几乎相同,我从网站下载了 5.1,并将其解压缩到 /usr/local/cudnn 但是当我放入 cudNN 版本时,我想用作5.1 它找不到 /usr/local/cudnn/libcudnn.so.5.1 但我确实有一个 5.0,所以我只说“5”作为版本并且它可以运行

这就是我现在能想出的全部......但我真的很想完成这个安装,任何帮助将不胜感激。

最佳答案

please specify the location where CUDA 8.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr

这里需要选择cuda安装目录的路径;这是 /usr/local/cuda (因为它也是默认设置);现在你把它设置为 /usr 这是错误的;您可以将其保留为默认值或将其设置为 /usr/local/cuda

Please specify the location where cuDNN 5 library is installed. Refer to README.md for more details. [Default is /usr]:/usr/local/cudnn

这里也是你需要设置的通常路径是/usr/local/cuda/

cudnn install

cp cudnn/lib64/cudnn* /usr/local/cuda/lib64
cp cudnn/include/* /usr/local/cuda/include

关于linux - TensorFlow from sources 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45755429/

相关文章:

python - Keras 比 TensorFlow 慢得不合理

python - 构建 tensorflow 数据集迭代器,生成具有特殊结构的批处理

tensorflow - 使用tensorflow实现自动编码器

linux - 未能创建 map : 22 Invalid argument

linux - CentOS 6.9 yum 和 yum 更新都不起作用

linux - Qt界面中识别项目的工具

python - Seq2Seq 模型和损失函数(在 keras 中)

tensorflow - 在估计器中同时使用batch_norm和dropout是否相关?

c++ - 使用 wxWidgets、Linux、C++ 构建源文件时出错

python - 管道长时间运行的进程