From f6ddc4f72ca3cf5a85d5797b185a4c034ddee9ce Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Mon, 7 Dec 2020 10:53:21 +0200 Subject: [PATCH] Add some guidelines for conda environments for training --- doc/TRAINING.rst | 20 ++++++++++++++++++-- doc/examples | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/doc/TRAINING.rst b/doc/TRAINING.rst index 7eed6b35..d5b1c7a9 100644 --- a/doc/TRAINING.rst +++ b/doc/TRAINING.rst @@ -15,17 +15,19 @@ Prerequisites for training a model Getting the training code ^^^^^^^^^^^^^^^^^^^^^^^^^ -Clone the latest released stable branch from Github (e.g. 0.8.2, check `here `_): +Clone the latest released stable branch from Github (e.g. 0.9.2, check `here `_): .. code-block:: bash - git clone --branch v0.8.2 https://github.com/mozilla/DeepSpeech + git clone --branch v0.9.2 https://github.com/mozilla/DeepSpeech If you plan on committing code or you want to report bugs, please use the master branch. Creating a virtual environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Throughout the documentation we assume you are using **virtualenv** to manage your Python environments. This setup is the one used and recommended by the project authors and is the easiest way to make sure you won't run into environment issues. If you're using **Anaconda, Miniconda or Mamba**, first read the instructions at :ref:`training-with-conda` and then continue from the installation step below. + In creating a virtual environment you will create a directory containing a ``python3`` binary and everything needed to run deepspeech. You can use whatever directory you want. For the purpose of the documentation, we will rely on ``$HOME/tmp/deepspeech-train-venv``. You can create it using this command: .. code-block:: @@ -527,3 +529,17 @@ Example of creating a pre-augmented test set: --augment overlay[source=noise.sdb,layers=1,snr=20~10] \ --augment resample[rate=12000:8000~4000] \ test.sdb test-augmented.sdb + +.. _training-with-conda: + +Training from an Anaconda or miniconda environment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Keep in mind that none of the core authors use Anaconda or miniconda, so this setup is not guaranteed to work. If you experience problems, try using a non-conda setup first. We're happy to accept pull requests fixing any incompatibilities with conda setups, but we will not offer any support ourselves beyond reviewing pull requests. + +To prevent common problems, make sure you **always use a separate environment when setting things up for training**: + +.. code-block:: bash + + (base) $ conda create -n deepspeech python=3.7 + (base) $ conda activate deepspeech diff --git a/doc/examples b/doc/examples index 6f5f501f..59388e11 160000 --- a/doc/examples +++ b/doc/examples @@ -1 +1 @@ -Subproject commit 6f5f501fa62743f1b78fe162eb1a579a450bd38f +Subproject commit 59388e116b70440a772c32d09977f5295e3d69c4