Skip to content

Building Running with Docker

Tatiana Likhomanenko edited this page Dec 10, 2019 · 10 revisions

wav2letter++ and its dependencies can also be built with the provided Dockerfile. Both CUDA and CPU backends are supported with Docker

To build wav2letter++ with Docker:

  • Install Docker and, if using the CUDA backend, nvidia-docker

  • Run the docker image with CUDA/CPU backend in a new container:

    # with CUDA backend
    sudo docker run --runtime=nvidia --rm -itd --ipc=host --name w2l wav2letter/wav2letter:cuda-latest
    # or with CPU backend
    sudo docker run --rm -itd --ipc=host --name w2l wav2letter/wav2letter:cpu-latest
    sudo docker exec -it w2l bash
    
  • To run tests inside a container

    cd /root/wav2letter/build && make test
    
  • Build Docker image from the source (using --no-cache will provide the latest version of flashlight inside the image if you have built the image previously for earlier versions of wav2letter):

    git clone --recursive https://github.com/facebookresearch/wav2letter.git
    cd wav2letter
    # for CUDA backend
    sudo docker build --no-cache -f ./Dockerfile-CUDA -t wav2letter .
    # for CPU backend
    sudo docker build --no-cache -f ./Dockerfile-CPU -t wav2letter .
    

    For logging during training/testing/decoding inside a container, use the --logtostderr=1 --minloglevel=0 flag.

Clone this wiki locally