CoolFace
Apppublic

aibchecker/whisper.cpp

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile37 linesDownload Raw Back to root
1FROM python:3.11-slim2 3# Install system dependencies4RUN apt-get update \5    && apt-get install -y --no-install-recommends ffmpeg libgomp1 \6    && rm -rf /var/lib/apt/lists/*7 8WORKDIR /app9 10# Ensure cache directories are writable and avoid '/.cache' root path11ENV HOME=/app \12    XDG_CACHE_HOME=/app/.cache \13    HF_HOME=/app/.cache/huggingface \14    CTRANSLATE2_CACHE_DIR=/app/.cache/ctranslate215 16RUN mkdir -p "$XDG_CACHE_HOME" "$HF_HOME" "$CTRANSLATE2_CACHE_DIR" \17    && chmod -R 777 /app/.cache18 19# Python dependencies20COPY requirements.txt /app/requirements.txt21RUN pip install --no-cache-dir -r /app/requirements.txt22 23# App source24COPY main.py /app/main.py25 26# Defaults (overridable at runtime)27ENV WHISPER_MODEL=small \28    WHISPER_DEVICE=cpu \29    WHISPER_COMPUTE_TYPE=int8 \30    WHISPER_BEAM_SIZE=5 \31    WHISPER_VAD=false \32    WHISPER_WORD_TIMESTAMPS=false33 34EXPOSE 786035 36CMD sh -c "uvicorn main:app --host 0.0.0.0 --port \${PORT:-7860}"37