我在构建张量流时遇到的一些问题

时间:2017-09-28 09:30:21

标签: python bazel

我无法在我的系统上构建张量流。我的配置:

system:ubuntu16.04
cuda:gtx1070
cudnn:6.0    
cuda:8.0    
tensorflow version:1.3.1    
python:3.5.3(install in the workspace of pyenv)    
bazel version:0.5.2    
gcc version:5.4.0

当我跑步时:

./configure
bazel build --config-opt --config-cuda //tensorflow/tools/pip_package:build_pip_package --verbose_failures

然后它崩溃了cuda存储库中缺少crosstool_wrapper_driver_is_not_gcc文件: enter image description here

生成的.tf_configure_bazelrc的内容是:

build --action_env PYTHON_BIN_PATH="/root/.pyenv/shims/python"
build --action_env PYTHON_LIB_PATH="/root/.pyenv/versions/3.5.3/lib/python3.5/site-packages"
build --define PYTHON_BIN_PATH="/root/.pyenv/shims/python"
build --define PYTHON_LIB_PATH="/root/.pyenv/versions/3.5.3/lib/python3.5/site-packages"
build --force_python=py3
build --host_force_python=py3
build --python3_path="/root/.pyenv/shims/python"
test --force_python=py3
test --host_force_python=py3
test --define PYTHON_BIN_PATH="/root/.pyenv/shims/python"
test --define PYTHON_LIB_PATH="/root/.pyenv/versions/3.5.3/lib/python3.5/site-packages"
run --define PYTHON_BIN_PATH="/root/.pyenv/shims/python"
run --define PYTHON_LIB_PATH="/root/.pyenv/versions/3.5.3/lib/python3.5/site-packages"
build --define with_jemalloc=true
build:opt --cxxopt=-march=native --copt=-march=native
build --action_env TF_NEED_CUDA="1"
build --action_env TF_NEED_OPENCL="0"
build --action_env TF_CUDA_CLANG="0"
build --action_env CUDA_TOOLKIT_PATH="/usr/local/cuda"
build --action_env TF_CUDA_VERSION="8.0"
build --action_env GCC_HOST_COMPILER_PATH="/usr/bin/gcc"
build --action_env TF_CUDNN_VERSION="6"
build --action_env CUDNN_INSTALL_PATH="/usr/local/cuda-8.0"
build --action_env TF_CUDNN_VERSION="6"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="6.1"
build --config=cuda
test --config=cuda

1 个答案:

答案 0 :(得分:1)

它抱怨找不到crosstool_wrapper_driver_is_not_gcc  file,它是C ++编译器的包装器。我尝试将bazel更新为0.6.0版。您可以重新运行--sandbox_debug,理想情况下,如果生成的沙箱目录包含crosstool_wrapper_driver_is_not_gcc,则手动检查生成的沙箱目录(如果权限设置正确),以及是否可以手动执行bazel尝试执行的命令。