我正在尝试构建支持 Deepspeech 的 GPU Tensorflow,因为我的 CPU 不支持 AVX 指令。我已按照以下说明进行操作https://deepspeech.readthedocs.io/en/latest/BUILDING.html。
我安装了 Bazel 3.1 版、libsox、SWIG 以及 CUDA 和 CUDNN 所需的所有其他软件。(Bazel 可执行文件的名称是 Bazel-3.1.0,因此我不得不将其重命名为 Bazel)Tensorflow 目录内的配置过程运行良好,它可以毫无问题地找到 Bazel、Python 和 CUDA。但是当我运行时:
bazel build --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-fvisibility=hidden
but when I run the bazel build
它不构建任何目标。构建过程的输出是:
Starting local Bazel server and connecting to it...
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=132
INFO: Reading rc options for 'build' from /home/tim/DeepSpeech/tensorflow/.bazelrc:
Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /home/tim/DeepSpeech/tensorflow/.bazelrc:
'build' options: --apple_platform_type=macos --define framework_shared_object=true --define open_source_build=true --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --copt=-DTFLITE_WITH_RUY_GEMV --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --noincompatible_prohibit_aapt1 --enable_platform_specific_config --config=v2
INFO: Reading rc options for 'build' from /home/tim/DeepSpeech/tensorflow/.tf_configure.bazelrc:
'build' options: --action_env PYTHON_BIN_PATH=/home/tim/anaconda3/envs/stt/bin/python3 --action_env PYTHON_LIB_PATH=/home/tim/anaconda3/envs/stt/lib/python3.6/site-packages --python_path=/home/tim/anaconda3/envs/stt/bin/python3 --config=xla --action_env CUDA_TOOLKIT_PATH=/usr/local/cuda-11.5 --action_env TF_CUDA_COMPUTE_CAPABILITIES=6.1,6.1 --action_env GCC_HOST_COMPILER_PATH=/usr/bin/x86_64-linux-gnu-gcc-11 --config=cuda --action_env TF_CONFIGURE_IOS=0
INFO: Found applicable config definition build:v2 in file /home/tim/DeepSpeech/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:xla in file /home/tim/DeepSpeech/tensorflow/.bazelrc: --action_env=TF_ENABLE_XLA=1 --define=with_xla_support=true
INFO: Found applicable config definition build:cuda in file /home/tim/DeepSpeech/tensorflow/.bazelrc: --config=using_cuda --define=using_cuda_nvcc=true
INFO: Found applicable config definition build:using_cuda in file /home/tim/DeepSpeech/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 /home/tim/DeepSpeech/tensorflow/.bazelrc: --define framework_shared_object=false
INFO: Found applicable config definition build:linux in file /home/tim/DeepSpeech/tensorflow/.bazelrc: --copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --config=dynamic_kernels
INFO: Found applicable config definition build:dynamic_kernels in file /home/tim/DeepSpeech/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
WARNING: Usage: bazel build <options> <targets>.
Invoke `bazel help build` for full description of usage and options.
Your request is correct, but requested an empty set of targets. Nothing will be built.
INFO: Analyzed 0 targets (0 packages loaded, 0 targets configured).
INFO: Found 0 targets...
INFO: Deleting stale sandbox base /home/tim/.cache/bazel/_bazel_tim/f4cacb5195cc5ff4ba816553e8499505/sandbox
INFO: Elapsed time: 4.736s, Critical Path: 0.46s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
我已经尝试过多次不使用 Anaconda3 和 CUDA 来解决这个问题,但结果总是一样。有人知道是什么原因造成的吗?
提前致谢。