Spaces:
Runtime error
Runtime error
FROM python:3.9 | |
RUN apt-get update && apt-get install -y gnupg && \ | |
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 A3A48C4A && \ | |
echo "deb http://ppa.launchpad.net/zeehio/festcat/ubuntu bionic main" >> /etc/apt/sources.list && \ | |
echo "deb-src http://ppa.launchpad.net/zeehio/festcat/ubuntu bionic main" >> /etc/apt/sources.list && \ | |
apt-get update && \ | |
apt-get -y install festival festvox-ca-ona-hts festvox-ca-pau-hts lame git make autoconf automake libtool pkg-config gcc libsonic-dev ronn kramdown libpcaudio-dev libatlas-base-dev gfortran | |
RUN git clone -b ca-pr https://github.com/projecte-aina/espeak-ng | |
RUN cd espeak-ng && \ | |
./autogen.sh && \ | |
./configure --prefix=/usr && \ | |
make && \ | |
make install | |
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 | |
COPY --chown=user requirements.txt . | |
COPY --chown=user models models | |
RUN pip install -r requirements.txt | |
RUN git clone https://github.com/jaywalnut310/vits.git && \ | |
cd vits && sed s/torch==1.6.0/torch==1.7.0/ requirements.txt > requirements.txt && pip install -r requirements.txt && cd monotonic_align && \ | |
python setup.py build_ext --inplace && cd /home/user | |
ENV PYTHONPATH=$PYTHONPATH:/home/user/app/vits | |
COPY --chown=user engine.py . | |
COPY --chown=user mms.py . | |
COPY --chown=user festival.py . | |
COPY --chown=user app.py . | |
RUN mkdir -p cache && chmod 777 cache | |
ENV NUMBA_CACHE_DIR=/home/user/cache | |
ENV MPLCONFIGDIR=/home/user/cache | |
EXPOSE 7860 | |
CMD ["python", "app.py"] | |