Spaces:
Runtime error
Runtime error
File size: 581 Bytes
9d6e878 57b876b 7f353a2 43cc63d 7f353a2 57b876b 785f21f 9d6e878 57b876b 03d3d29 9d6e878 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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"]
|