Download Dockerfile from Kennethdot/kasanoma_whisper.cpp_: direct link, hf CLI and curl.
- Browser
- Download file 935 Bytes
-
https://huggingface.co/spaces/Kennethdot/kasanoma_whisper.cpp_/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Kennethdot/kasanoma_whisper.cpp_/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Kennethdot/kasanoma_whisper.cpp_/resolve/main/Dockerfile
935 Bytes
| FROM python:3.11-slim AS builder | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential cmake git ffmpeg && \ | |
| rm -rf /var/lib/apt/lists/* | |
| WORKDIR /build | |
| RUN git clone --depth 1 https://github.com/ggml-org/whisper.cpp . | |
| RUN cmake -B build -DCMAKE_BUILD_TYPE=Release && \ | |
| cmake --build build -j --config Release --target whisper-cli | |
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY --from=builder /build/build/bin/whisper-cli /usr/local/bin/whisper-cli | |
| COPY --from=builder /build/build/src/libwhisper.so* /usr/local/lib/ | |
| RUN ldconfig | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| RUN mkdir -p /app/dataset/audio /app/static && chmod -R 777 /app/dataset /app/static | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |