Trying to build `generate_scorer_package` with `bazel` under deepspeech-train:v0.9.3 Docker image

Hi everyone,

I’m trying to add some information to the PlayBook around generating a new scorer file. I’m using;

  • Docker image from mozilla/deepspeech-train:v0.9.3

and am following the v0.9.3 documentation for building a scorer here. I have been able to successfully create an lm.binary and vocab-500000.txt file.

$ ls
total 548
  4 drwxrwxr-x 2 kathyreid kathyreid   4096 Feb 24 19:05 ./
  4 drwxrwxr-x 6 kathyreid kathyreid   4096 Feb 24 19:05 ../
488 -rw-r--r-- 1 root      root      499594 Feb 24 19:05 lm.binary
 52 -rw-r--r-- 1 root      root       51178 Feb 24 19:05 vocab-500000.txt

I’m now stuck trying to use generate_scorer_package.

I have attempted the following;

root@0928acdb7399:/DeepSpeech/data/lm# 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 //native_client:libdeepspeech.so //native_client:generate_scorer_package
ERROR: The 'build' command is only supported from within a workspace (below a directory having a WORKSPACE file).
See documentation at https://docs.bazel.build/versions/master/build-ref.html#workspace
  • I searched using find and grep but could not find a WORKSPACE file in the filesystem.

What should I try next?

As documented in Building DeepSpeech Binaries — DeepSpeech 0.9.3 documentation

Following the same setup as for libdeepspeech.so above

You need to run bazel build from within tensorflow directory, not data/lm

I would have expected people to just download the released binaries rather than going through the pain of rebuilding. At least, this is what we advertise as default course.

1 Like

Super helpful, now I understand what I was doing wrong. Merci beaucoup!

I will also use the packaged native_client rather than compiling from src.