Spaces:
Running
Running
| FROM python:3.11-slim | |
| ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH PORT=7860 \ | |
| WHISPER_MODEL=deepdml/faster-whisper-large-v3-ct2 \ | |
| OMP_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 \ | |
| TOKENIZERS_PARALLELISM=false \ | |
| WHISPER_CPU_THREADS=2 WHISPER_NUM_BEAMS=1 \ | |
| WHISPER_VAD_FILTER=0 WHISPER_PRELOAD_ON_START=1 \ | |
| WHISPER_BACKEND=auto WHISPER_REMOTE_PROVIDER=hf-inference \ | |
| WHISPER_REMOTE_MODEL=openai/whisper-large-v3 \ | |
| WHISPER_REMOTE_TIMEOUT=15 WHISPER_PREPROCESS_AUDIO=1 | |
| RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && useradd -m -u 1000 user | |
| USER user | |
| WORKDIR /home/user/app | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| COPY --chown=user app.py ./ | |
| COPY --chown=user expense_predictor.py ./ | |
| COPY --chown=user extractors/ ./extractors/ | |
| EXPOSE 7860 | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--worker-class", "sync", "--workers", "1", "--timeout", "300", "app:app"] | |