From e2597bdde354cbe5a8414f8532e7d3baa83dffaa Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 4 Apr 2023 02:20:40 -0700 Subject: [PATCH] Dockerfile for VITS --- tts/vits/Dockerfile | 69 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 tts/vits/Dockerfile diff --git a/tts/vits/Dockerfile b/tts/vits/Dockerfile new file mode 100644 index 0000000..c5e0089 --- /dev/null +++ b/tts/vits/Dockerfile @@ -0,0 +1,69 @@ +# ==================== BASE CONTAINER + REQUIREMENTS ==================== + +FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 + +# See: https://github.com/opencontainers/image-spec/blob/master/annotations.md +LABEL org.opencontainers.image.title='Storyteller ML : VITS' +LABEL org.opencontainers.image.description='Storyteller ML : VITS' +LABEL org.opencontainers.image.documentation='https://github.com/storytold/storyteller-ml' +LABEL org.opencontainers.image.source='https://github.com/storytold/storyteller-ml' +LABEL org.opencontainers.image.url='https://github.com/storytold/storyteller-ml' + +# tzdata install hangs without presetting the time zone +ENV TZ=UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +# Notes on packages: +# * espeak-ng is critical for speech +# * screen: not sure why included; I threw in tmux and curl for good measure +# * unzip: not sure why included, but perhaps downloading models +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ + && apt-get install -y --no-install-recommends \ + build-essential \ + curl \ + espeak-ng \ + python3-dev \ + python3-pip \ + python3.10 \ + python3.10-venv \ + screen \ + tmux \ + unzip + +RUN python3 --version + +# ==================== INSTALL MORE VITS REQUIREMENTS ==================== + +WORKDIR / +RUN mkdir -p /vits +COPY ./requirements.txt /vits + +WORKDIR /vits + +RUN pip3 install --upgrade pip setuptools \ + && pip3 install -r requirements.txt \ + && pip3 install \ + transformers \ + g2p-en \ + scipy \ + text_unidecode \ + emoji \ + phonemizer \ + numpy \ + matplotlib \ + librosa==0.9.2 \ + Cython \ + Unidecode \ + tensorboard \ + gdown + +# ==================== VITS CODE + FINAL BUILD ==================== + +COPY ./ ./ + +RUN cd monotonic_align \ + && mkdir monotonic_align \ + && python3 setup.py build_ext --inplace \ + && cd .. + +WORKDIR /