ccoreilly's picture
fix models copy
917b122
raw
history blame
787 Bytes
FROM python:3.9
RUN apt update && apt install -y git make autoconf automake libtool pkg-config gcc libsonic-dev ronn kramdown libpcaudio-dev
RUN git clone 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
COPY --chown=user engine.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"]