This repository was archived by the owner on Mar 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (42 loc) · 1.47 KB
/
Dockerfile
File metadata and controls
62 lines (42 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# stage one, build packages
FROM python:3.13.2-slim AS builder
WORKDIR /usr
RUN apt-get update && apt-get install -y --no-install-recommends\
libgl1-mesa-glx \
build-essential \
git \
gcc \
curl \
cmake \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# stage two, building whisper.cpp executale
FROM builder AS whisper-builder
WORKDIR /whisper
RUN git clone https://github.com/ggml-org/whisper.cpp.git && \
cd whisper.cpp && \
sh ./models/download-ggml-model.sh base.en && \
cmake -B build && \
cmake --build build -j --config Release
# stage three, building my pyhton agent
FROM builder AS python-builder
WORKDIR /python-app
COPY requirements.txt .
RUN pip install --upgrade pip && \
pip install --prefix=/install --no-cache-dir -r requirements.txt
# stage four, copying essesntial and creating image
FROM python:3.13.2-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends\
sox \
supervisor \
redis-server \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=python-builder /install /usr/local
COPY --from=whisper-builder /whisper/whisper.cpp/build/bin/whisper-cli /usr/local/bin/
COPY --from=whisper-builder /whisper/whisper.cpp/build/libwhisper.so* /usr/local/lib/
RUN chmod +x /usr/local/bin/whisper-cli
COPY . .
RUN mkdir -p /etc/supervisor/conf.d
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 8080
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]