Sign inSign up

dhardestylewis/deepspeech_train_docker

By dhardestylewis

Updated over 5 years ago

Image
1

246

dhardestylewis/deepspeech_train_docker repository overview

Dockerfile for Deepspeech's official training set

The following instructions are for Docker. Instructions for Singularity are below.

Deepspeech commands may be run as one-off commands using this Docker image using the following shell command as a template:

docker run --name deepspeech_bash --rm -i -t deepspeech --mount type=bind,source="$(pwd)",target="/mnt/host" python3 DeepSpeech.py --train_files /mnt/host/data/CV/en/clips/train.csv --dev_files /mnt/host/data/CV/en/clips/dev.csv --test_files /mnt/host/data/CV/en/clips/test.csv

or multiple Deepspeech commands may be run in sequence bringing up the Docker image once for all commands using the following shell command as a template:

docker run --name deepspeech_bash --rm -i -t deepspeech --mount type=bind,source="$(pwd)",target="/mnt/host" bash deepspeech_commands.sh

where deepspeech_commands.sh is written according to this template:

#!/bin/bash
pitremove -z /mnt/host/DEM.tif -fel /mnt/host/DEMfel.tif

Singularity instructions.

The Singularity pull command is similar to the Docker pull command:

singularity pull \
    --name deepspeech.sif \
    docker://dhardestylewis/deepspeech_docker:latest

Once pulled, a one-off Deepspeech command using Singularity can be issued:

singularity exec \
    deepspeech.sif \
    bash -c "python3 DeepSpeech.py --train_files /mnt/host/data/CV/en/clips/train.csv --dev_files /mnt/host/data/CV/en/clips/dev.csv --test_files /mnt/host/data/CV/en/clips/test.csv"

An interactive shell in the Singularity container may be used for troubleshooting or debugging:

singularity exec \
    deepspeech.sif \
    bash

Deepspeech combined with other commands in a shell script

Deepspeech may be wrapped in a shell script and run using Docker:

docker run \
    --name deepspeech_bash \
    --rm \
    -i \
    -t \
    dhardestylewis/deepspeech_docker:latest \
    --mount type=bind,source="$(pwd)",target="/mnt/host" \
    bash -c './deepspeech_commands.sh'

where the file deepspeech_commands.sh may be written as:

#!/bin/bash

## Execute test command to demonstrate functioning image
python3 DeepSpeech.py --train_files /mnt/host/data/CV/en/clips/train.csv --dev_files /mnt/host/data/CV/en/clips/dev.csv --test_files /mnt/host/data/CV/en/clips/test.csv 

To do the same using Singularity, execute:

singularity exec \
    deepspeech.sif \
    bash -c './deepspeech_commands.sh'

where deepspeech_commands.sh is written as above.

Tag summary

Content type

Image

Digest

Size

2.2 GB

Last updated

over 5 years ago

docker pull dhardestylewis/deepspeech_train_docker