File size: 558 Bytes
a4a3878
 
 
 
 
 
 
 
 
 
 
a2fed52
 
0927600
a2fed52
a4a3878
 
 
a2fed52
 
a4a3878
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.11-slim

WORKDIR /app

RUN apt-get update \
    && apt-get install -y --no-install-recommends ffmpeg \
    && rm -rf /var/lib/apt/lists/*

COPY ml/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

ENV HF_HOME=/app/.cache/huggingface
RUN python -c "from huggingface_hub import snapshot_download; snapshot_download('Systran/faster-whisper-small')"

COPY ml/ ./ml/

WORKDIR /app/ml

ENV MODEL_PATH=Systran/faster-whisper-small

EXPOSE 8000

CMD ["uvicorn", "serve:app", "--host", "0.0.0.0", "--port", "8000"]