Spaces:
Running
Running
File size: 1,070 Bytes
95d5bed cdef530 f856ebd b28aa53 369d759 b28aa53 e8003c4 f856ebd e8003c4 95d5bed 2a93301 cdef530 95d5bed cdef530 95d5bed cdef530 95d5bed 218085c 82b086c 218085c 95d5bed 76ce486 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 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"]
|