flask_whisper / Dockerfile
Michael Natanael
change transcribe mechanism when uploading audio
57238f2
raw
history blame
700 Bytes
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
FROM python:3.9
# Set proper Python threading configuration
ENV OMP_NUM_THREADS=4
ENV NUMEXPR_NUM_THREADS=4
ENV MKL_NUM_THREADS=4
RUN apt update
RUN apt --yes install ffmpeg
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
# CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
CMD ["gunicorn", "--timeout", "300", "--workers", "1", "--threads", "2", "-b", "0.0.0.0:7860", "app:app"]