Dockerfile 710 B

1234567891011121314151617181920212223242526272829303132333435
  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 make
  11. # main image
  12. FROM python:3.9-slim-bullseye
  13. WORKDIR /app/
  14. # Install dependencies
  15. RUN apt-get update && apt-get install -y \
  16. ffmpeg libolm-dev gcc make wget\
  17. && apt-get clean \
  18. && rm -rf /var/lib/apt/lists/*
  19. ADD requirements.txt .
  20. RUN pip install -r requirements.txt && \
  21. apt-get remove -y gcc make && \
  22. apt-get autoremove -y
  23. COPY --from=builder /build/main /app/
  24. VOLUME /data/
  25. ADD ./*.py /app/
  26. CMD ["python3", "-u", "main.py"]