Merge pull request #90 from TomzxForks/features/dockerfile

Initial Dockerfile
This commit is contained in:
Eren Golge 2018-12-28 14:03:40 +01:00 committed by GitHub
commit e78911bf88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 9 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM nvidia/cuda:9.0-base-ubuntu16.04 as base
WORKDIR /srv/app
RUN apt-get update && \
apt-get install -y git software-properties-common wget vim build-essential libsndfile1 && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.6 python3.6-dev python3.6-tk && \
# Install pip manually
wget https://bootstrap.pypa.io/get-pip.py && \
python3.6 get-pip.py && \
rm get-pip.py && \
# Used by the server in server/synthesizer.py
pip install soundfile
ADD . /srv/app
# Setup for development
RUN python3.6 setup.py develop
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
CMD python3.6 server/server.py -c server/conf.json

View File

@ -23,6 +23,14 @@ Or you can use ```requirements.txt``` to install the requirements only.
```pip install -r requirements.txt```
### Docker
A barebone `Dockerfile` exists at the root of the project, which should let you quickly setup the environment. By default, it will start the server and let you query it. Make sure to use `nvidia-docker` to use your GPUs. Make sure you follow the instructions in the [`server README`](server/README.md) before you build your image so that the server can find the model within the image.
```
docker build -t mozilla-tts .
nvidia-docker run -it --rm -p 5002:5002 mozilla-tts
```
## Checkpoints and Audio Samples
Checkout [here](https://mycroft.ai/blog/available-voices/#the-human-voice-is-the-most-perfect-instrument-of-all-arvo-part) to compare the samples (except the first) below.