Exceedea / Dockerfile
EladSpamson's picture
Update Dockerfile
57b876b verified
raw
history blame
581 Bytes
FROM python:3.10-slim
# Environment variable overrides
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 for audio decoding (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's timeout (300s) for bigger files
ENV GUNICORN_CMD_ARGS="--timeout 300 --workers=1"
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]