Spaces:
Sleeping
Sleeping
Download Dockerfile from aibchecker/whisper.cpp: direct link, hf CLI and curl.
- Browser
- Download file 948 Bytes
-
https://huggingface.co/spaces/aibchecker/whisper.cpp/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aibchecker/whisper.cpp/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aibchecker/whisper.cpp/resolve/main/Dockerfile
948 Bytes
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends ffmpeg libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Ensure cache directories are writable and avoid '/.cache' root path | |
| ENV HOME=/app \ | |
| XDG_CACHE_HOME=/app/.cache \ | |
| HF_HOME=/app/.cache/huggingface \ | |
| CTRANSLATE2_CACHE_DIR=/app/.cache/ctranslate2 | |
| RUN mkdir -p "$XDG_CACHE_HOME" "$HF_HOME" "$CTRANSLATE2_CACHE_DIR" \ | |
| && chmod -R 777 /app/.cache | |
| # Python dependencies | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # App source | |
| COPY main.py /app/main.py | |
| # Defaults (overridable at runtime) | |
| ENV WHISPER_MODEL=small \ | |
| WHISPER_DEVICE=cpu \ | |
| WHISPER_COMPUTE_TYPE=int8 \ | |
| WHISPER_BEAM_SIZE=5 \ | |
| WHISPER_VAD=false \ | |
| WHISPER_WORD_TIMESTAMPS=false | |
| EXPOSE 7860 | |
| CMD sh -c "uvicorn main:app --host 0.0.0.0 --port \${PORT:-7860}" | |