Installation and configuration with Ansible
- Deepspeech 0.5.1 & Tensorflow 1.13.1
- Deepspeech 0.7.0-alpha.3 & Tensorflow 1.15.0
Complete Documentation (EN/FR)
There is 10 scripts (including 1 optional)
-
The first one (
Install.yaml
) installs the required dependencies to execute the deployment. -
The next 4 scripts, copy and install the dependencies to build and use deepspeech and tensorflow.
SOX.yaml
KENLM.yaml
SWIG.yaml
BAZEL.yaml
-
The sixth script (
DEEPSPEECH.yaml
) clone the Mozilla/DeepSpeech repository, then checkout the branch to the chosen version and download the files with git-lfs (approximately 1.7GB for version 0.5.1 & 700MB for version 0.7.0-alpha.3) -
The seventh script (
TENSORFLOW.yaml
) clone the Mozilla/tensorflow repository, checkout the branch to the chosen version, then launch these commands to build tensorflow and deepspeech. This script calls an another one (answer_tensorflow.yaml
) to answer automatically to the question asked during the configuration. -
The eighth script (
TS_DEEPSPEECH.yaml
) build and install the files withinDeepSpeech/native_client/
,- Javascript
- ctcdecode
- deepspeech
- Python
-
The last script (
Test.yaml
), it launches the demo included in the deepspeech directory. That test must complete without errors.
The SUDO password will be required (--ask-become)
ansible-playbook -i 1.2.3.4, Scripts/Main.yaml --extra-vars='{"tensorflow_version": "r1.13","DeepSpeech_version": "tags/v0.5.1","bazel_version": "0.19.1"}'--ask-become
ansible-playbook -i 1.2.3.4, Scripts/Main.yaml --ask-become
--extra-vars='{"tensorflow_version": "r1.15","DeepSpeech_version": "tags/v0.7.0-alpha.3","bazel_version": "0.24.1"}'
You can execute each command manually:
ansible-playbook -i 1.2.3.4, Scripts/Install.yaml --ask-become
ansible-playbook -i 1.2.3.4, Scripts/SOX.yaml --ask-become
ansible-playbook -i 1.2.3.4, Scripts/KENLM.yaml --ask-become --extra-vars '{"cores":8}'
ansible-playbook -i 1.2.3.4, Scripts/SWIG.yaml --ask-become
ansible-playbook -i 1.2.3.4, Scripts/BAZEL.yaml --extra-vars '{"bazel_version":"0.21.0"}' --ask-become
ansible-playbook -i 1.2.3.4, Scripts/DEEPSPEECH.yaml --extra-vars '{"DeepSpeech_version":"tags/v0.5.1"}' --ask-become
ansible-playbook -i 1.2.3.4, Scripts/TENSORFLOW.yaml --extra-vars '{"tensorflow_version":"r1.13"}' --ask-become
ansible-playbook -i 1.2.3.4, Scripts/TS_DEEPSPEECH.yaml --extra-vars '{"cores":8}' --ask-become
ansible-playbook -i 1.2.3.4, Scripts/Test.yaml --ask-become
This playbook TS_DEEPSPEECH.yaml
,
will maybe return an error at this task : ```Build Tensorflow `build_pip_package````
I've added
ignore_errors
to continue with the testing playbook, if the test is PASS, you can safely ignore this issue.
The solution is to do these commands manually in a SSH console or on the shell directly,
cd /srv/tensorflow
./configure # I answered NO to all questions and use the default options for Python
bazel build --config=opt --config=noaws --config=nogcp --config=nohdfs --config=noignite --config=nokafka --config=nonccl //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow
pip3 uninstall -y tensorflow
pip3 install /tmp/tensorflow/*.whl
If you know the reason why using the ansible Shell module it doesn't work, please let me know, thank you