gpt4 book ai didi

Tensorflow bazel 构建失败 - 未生成 bazel-bin 目录

转载 作者:行者123 更新时间:2023-12-02 03:13:11 30 4
gpt4 key购买 nike

我正在尝试使用以下配置从源安装 Tensorflow:

  • 英伟达 GTX 1070
  • Ubuntu 16.04
  • CUDA 8.0
  • Cudnn v5.0

我已按照 here 中的以下步骤操作:

  • 已安装的 bazel
  • 已安装的依赖
  • 已安装 CUDA 支持
  • ./configure 支持 CUDA 8.0
  • bazel build -c opt --config=cuda//tensorflow/tools/pip_package:build_pip_package

这一步之后,据我所知,应该有一个bazel-bin目录,方便后续执行

$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

# The name of the .whl file will depend on your platform.
$ sudo pip install /tmp/tensorflow_pkg/tensorflow-0.10.0rc0-py2-none-any.whl

但是,没有这样的目录。

我感觉这条错误消息可能与此有关?

ERROR: /usr/local/lib/python2.7/dist-packages/tensorflow_clone/tensorflow/contrib/rnn/BUILD:45:1: error while parsing .d file: /home/volcart/.cache/bazel/_bazel_volcart/62dff5ffffc63bcd8a9350984645e0be/execroot/tensorflow_clone/bazel-out/local_linux-opt/bin/tensorflow/contrib/rnn/_objs/python/ops/_lstm_ops_gpu/tensorflow/contrib/rnn/kernels/lstm_ops_gpu.cu.pic.d (No such file or directory).
nvcc warning : option '--relaxed-constexpr' has been deprecated and replaced by option '--expt-relaxed-constexpr'.
In file included from third_party/gpus/cuda/include/cuda_runtime.h:78:0,
from <command-line>:0:
third_party/gpus/cuda/include/host_config.h:115:2: error: #error -- unsupported GNU version! gcc versions later than 5.3 are not supported!
#error -- unsupported GNU version! gcc versions later than 5.3 are not supported!

重新执行 bazel build ... 我发现了这个...

WARNING: /usr/local/lib/python2.7/dist-packages/tensorflow/util/python/BUILD:11:16: in includes attribute of cc_library rule //util/python:python_headers: 'python_include' resolves to 'util/python/python_include' not in 'third_party'. This will be an error in the future.

我还应该添加这个...

$ bazel version
Build label: 0.3.1
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jul 29 09:09:52 2016 (1469783392)
Build timestamp: 1469783392
Build timestamp as int: 1469783392

最佳答案

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

导致权限问题。添加了 sudo

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

关于Tensorflow bazel 构建失败 - 未生成 bazel-bin 目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38773402/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com