vits2 / Dockerfile
wetdog's picture
Create Dockerfile
396b4b5
raw
history blame contribute delete
No virus
1.17 kB
# Use an official Python runtime as a parent image
FROM python:3.10.12-slim
# Install required packages for building eSpeak and general utilities
RUN apt-get update && apt-get install -y \
build-essential \
autoconf \
automake \
libtool \
pkg-config \
git \
cmake \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# eSpeak install
RUN git clone -b dev-ca https://github.com/projecte-aina/espeak-ng
RUN pip install --upgrade pip && \
cd espeak-ng && \
./autogen.sh && \
./configure --prefix=/usr && \
make && \
make install
RUN mkdir -p cache && chmod 777 cache
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# vits2 install
RUN git clone -b dev-cat https://github.com/langtech-bsc/vits2_pytorch $HOME/app/vits2_pytorch
RUN cd $HOME/app/vits2_pytorch && \
pip install -r requirements.txt --no-cache && \
cd monotonic_align && \
python setup.py build_ext --inplace
COPY --chown=user . $HOME/app/vits2_pytorch/
EXPOSE 7860
CMD ["python3", "-u", "vits2_pytorch/app.py"]