我想从源代码为c ++构建Tensorflow(GPU),但是在尝试构建pip软件包步骤时,我总是会出错。我需要什么来使此步骤起作用?
我在Windows 10上,但是如果需要,我有Cygwin。我正在构建可与我的GPU一起使用的Tensorflow,因为我有一个不错的,所以为什么不这样做。我似乎能找到的唯一建议是将Bazel的版本切换,但我已经尝试了许多不同的版本,从0.18.0到最新版本,但我现在正在使用0.24.1,因为这似乎是Tensorflow 1.14的推荐版本。但是,我正在使用CUDA 10.1,但我看不到它将如何导致此问题。
这是我无法使用的命令:
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
我不确定最需要什么信息,因此这里是整个输出。我有各种不同的错误,但这就是现在给我的:
WARNING: The following configs were expanded more than once: [cuda, using_cuda]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=70
INFO: Options provided by the client:
'build' options: --python_path=C:/Users/Invilis Bella/AppData/Local/Programs/Python/Python37-32/python.exe
INFO: Reading rc options for 'build' from b:\tensorflow\tensorflow\.bazelrc:
'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone --strategy=Genrule=standalone -c opt --announce_rc --define=grpc_no_ares=true --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include
INFO: Reading rc options for 'build' from b:\tensorflow\tensorflow\.tf_configure.bazelrc:
'build' options: --action_env PYTHON_BIN_PATH=C:/Users/Invilis Bella/AppData/Local/Programs/Python/Python37-32/python.exe --action_env PYTHON_LIB_PATH=C:/Users/Invilis Bella/AppData/Local/Programs/Python/Python37-32/lib/site-packages --python_path=C:/Users/Invilis Bella/AppData/Local/Programs/Python/Python37-32/python.exe --action_env CUDA_TOOLKIT_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1 --action_env TF_CUDA_COMPUTE_CAPABILITIES=6.1 --config=cuda --config monolithic --copt=-w --host_copt=-w --copt=-DWIN32_LEAN_AND_MEAN --host_copt=-DWIN32_LEAN_AND_MEAN --copt=-DNOGDI --host_copt=-DNOGDI --verbose_failures --distinct_host_configuration=false --define=override_eigen_strong_inline=true --action_env TF_CONFIGURE_IOS=0
INFO: Found applicable config definition build:cuda in file b:\tensorflow\tensorflow\.bazelrc: --config=using_cuda --define=using_cuda_nvcc=true
INFO: Found applicable config definition build:using_cuda in file b:\tensorflow\tensorflow\.bazelrc: --define=using_cuda=true --action_env TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain
INFO: Found applicable config definition build:monolithic in file b:\tensorflow\tensorflow\.bazelrc: --define framework_shared_object=false
INFO: Found applicable config definition build:opt in file b:\tensorflow\tensorflow\.tf_configure.bazelrc: --copt=/arch:AVX2 --define with_default_optimizations=true
INFO: Found applicable config definition build:cuda in file b:\tensorflow\tensorflow\.bazelrc: --config=using_cuda --define=using_cuda_nvcc=true
INFO: Found applicable config definition build:using_cuda in file b:\tensorflow\tensorflow\.bazelrc: --define=using_cuda=true --action_env TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last):
File "C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164
_clone_or_update(ctx)
File "C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update
fail(("error cloning %s:\n%s" % (ctx....)))
error cloning io_bazel_rules_docker:
/usr/bin/bash: line 1: cd: too many arguments
+ cd C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external
/usr/bin/bash: line 3: cd: too many arguments
+ git -C 'C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/io_bazel_rules_docker' reset --hard 251f6a68b439744094faff800cd029798edf9faa
fatal: not a git repository (or any of the parent directories): .git
+ git -C 'C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/io_bazel_rules_docker' fetch origin 251f6a68b439744094faff800cd029798edf9faa:251f6a68b439744094faff800cd029798edf9faa
fatal: not a git repository (or any of the parent directories): .git
+ git -C 'C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/io_bazel_rules_docker' fetch origin 251f6a68b439744094faff800cd029798edf9faa:251f6a68b439744094faff800cd029798edf9faa
fatal: not a git repository (or any of the parent directories): .git
ERROR: error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories': Traceback (most recent call last):
File "C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/bazel_tools/tools/build_defs/repo/git.bzl", line 164
_clone_or_update(ctx)
File "C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/bazel_tools/tools/build_defs/repo/git.bzl", line 74, in _clone_or_update
fail(("error cloning %s:\n%s" % (ctx....)))
error cloning io_bazel_rules_docker:
/usr/bin/bash: line 1: cd: too many arguments
+ cd C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external
/usr/bin/bash: line 3: cd: too many arguments
+ git -C 'C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/io_bazel_rules_docker' reset --hard 251f6a68b439744094faff800cd029798edf9faa
fatal: not a git repository (or any of the parent directories): .git
+ git -C 'C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/io_bazel_rules_docker' fetch origin 251f6a68b439744094faff800cd029798edf9faa:251f6a68b439744094faff800cd029798edf9faa
fatal: not a git repository (or any of the parent directories): .git
+ git -C 'C:/users/invilis bella/_bazel_invilis bella/ldshq52a/external/io_bazel_rules_docker' fetch origin 251f6a68b439744094faff800cd029798edf9faa:251f6a68b439744094faff800cd029798edf9faa
fatal: not a git repository (or any of the parent directories): .git
INFO: Elapsed time: 0.511s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)