File size: 553 Bytes
8c80fe7
 
 
749ddf9
8c80fe7
 
c2469fc
3d846b2
 
 
661aaa3
 
e28dc9a
 
8c80fe7
 
 
 
eb6ebfe
 
8c80fe7
 
 
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.9-slim

RUN apt update && \
    apt install -y ffmpeg git poppler-utils && \
    apt clean

# Set Hugging Face and model cache dirs to a writable location
ENV HF_HOME=/tmp/hf
ENV TRANSFORMERS_CACHE=/tmp/hf
ENV XDG_CACHE_HOME=/tmp/hf
ENV MPLCONFIGDIR=/tmp/matplotlib

RUN mkdir -p /data/hf && chmod -R 777 /data/hf

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

RUN python3 -c "from faster_whisper import WhisperModel; WhisperModel('base', compute_type='int8')"

COPY . .

CMD ["python", "app.py"]