|
|
FROM python:3.10 |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
|
git \ |
|
|
git-lfs \ |
|
|
ffmpeg \ |
|
|
libsm6 \ |
|
|
libxext6 \ |
|
|
cmake \ |
|
|
rsync \ |
|
|
libgl1 \ |
|
|
libglx-mesa0 \ |
|
|
&& rm -rf /var/lib/apt/lists/* \ |
|
|
&& git lfs install |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY requirements.txt . |
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
|
|
|
ENV HF_HOME=/tmp/huggingface_cache |
|
|
ENV HF_HUB_CACHE=/tmp/huggingface_cache |
|
|
RUN mkdir -p /tmp/huggingface_cache && chmod -R 777 /tmp/huggingface_cache |
|
|
|
|
|
|
|
|
RUN python -c "from faster_whisper import WhisperModel; WhisperModel('Systran/faster-whisper-small', device='cpu', compute_type='int8')" |
|
|
|
|
|
COPY . . |
|
|
|
|
|
CMD ["python", "app.py"] |
|
|
|