Exceedea / Dockerfile
EladSpamson's picture
Update Dockerfile
03d3d29 verified
raw
history blame
541 Bytes
FROM python:3.10-slim
ENV HF_HOME=/tmp/hf_cache
ENV TRANSFORMERS_CACHE=/tmp/hf_cache
ENV HF_DATASETS_CACHE=/tmp/hf_cache
ENV XDG_CACHE_HOME=/tmp
WORKDIR /app
COPY . /app
# Install apt packages to decode MP3, WAV, etc.
RUN apt-get update && apt-get install -y ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir -r requirements.txt
# Increase Gunicorn timeout from default 30s to 5 minutes
ENV GUNICORN_CMD_ARGS="--timeout 300 --workers=1"
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]