Score:0

Bazel finds no targets to be built for tensorflow

cn flag
Tim

I'm trying to build Tensorflow with GPU support for Deepspeech because my CPU does not support AVX instructions. I have followed the instructions from https://deepspeech.readthedocs.io/en/latest/BUILDING.html .

I installed Bazel version 3.1, libsox, SWIG and everything else needed for CUDA and CUDNN. (The name of the Bazel executable was Bazel-3.1.0 so I had to rename it to Bazel) The configuration process inside the Tensorflow directory works just fine, it finds Bazel, Python and CUDA without any problems. But then when I run:

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 

It does not build any targets. The output of the build process is:

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

I have tried this without Anaconda3 and without CUDA, many times and it ends always the same way. Has anyone an idea what can be causing this?

Thanks in advance.

cocomac avatar
cn flag
What version of Ubuntu are you using? Also, if your CPU is old enough to not support AVX (most [Intel] CPUs from after 2011), your machine learning task might run very slowly, especially if you aren't using a GPU.
Tim avatar
cn flag
Tim
I am running Kubuntu 21.10 and my GPUs are NVIDIA Geforce GTX 1070 Ti . I know that the CPU would be far to slow, thats why I want to use the GPUs .
cocomac avatar
cn flag
Does the package really require AVX? I get why the CPU version might, but I'm a bit surprised that the GPU one does. Would you mind trying to simply install the GPU package and see if it works? You will need CUDA 10.1 or later and CuDNN 7.6 or later. Once you have those, can you try activating your virtual envoirnment, and doing `pip3 install deepspeech-gpu`.
Tim avatar
cn flag
Tim
I have already tried that in the past and it did not work. It is also described in the Deepspeech docu: https://deepspeech.readthedocs.io/en/r0.9/SUPPORTED_PLATFORMS.html
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.