FROM ubuntu | |
RUN apt update && apt install -y python3 python3-pip ffmpeg nano | |
RUN pip install flask transformers librosa torch torchaudio gunicorn | |
RUN useradd -m -u 1000 user | |
USER user | |
WORKDIR /app | |
COPY --chown=user:user . /app | |
RUN chown -R user:user /app | |
RUN mkdir /app/cache | |
ENV HF_HOME=/app/cache | |
EXPOSE 7860 | |
CMD ["gunicorn", "-b", ":7860", "-w", "1", "host:app", "--timeout", "100"] |