Dockerfile 700 B

1234567891011121314151617181920212223242526272829303132
  1. # build image
  2. FROM debian:bullseye-slim AS builder
  3. WORKDIR /build/
  4. RUN apt-get update && apt-get install --no-install-recommends -y \
  5. make gcc g++ wget \
  6. && apt-get clean \
  7. && rm -rf /var/lib/apt/lists/*
  8. # Install Whisper.cpp
  9. ADD whisper.cpp/ /build/
  10. RUN gcc -pthread -O3 -march=native -c ggml.c && \
  11. g++ -pthread -O3 -std=c++11 -c main.cpp && \
  12. g++ -pthread -o main ggml.o main.o
  13. # main image
  14. FROM alpine
  15. WORKDIR /app/
  16. # Install dependencies
  17. RUN apk add ffmpeg py3-olm py3-matrix-nio py3-pip py3-pillow gcompat wget
  18. ADD requirements.txt .
  19. RUN pip install -r requirements.txt
  20. COPY --from=builder /build/main /app/
  21. VOLUME /data/
  22. ADD ./*.py /app/
  23. CMD ["python3", "-u", "main.py"]