-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathContainerfile
More file actions
54 lines (39 loc) · 1.28 KB
/
Copy pathContainerfile
File metadata and controls
54 lines (39 loc) · 1.28 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
FROM ubuntu:24.04 AS builder
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
git \
glslc \
spirv-headers \
glslang-tools \
libvulkan-dev \
pkg-config \
curl \
libcurl4-openssl-dev && \
rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 https://github.com/ggml-org/whisper.cpp.git
RUN cmake whisper.cpp \
-B whisper.cpp/build \
-DGGML_VULKAN=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-march=sandybridge -mtune=generic -mno-avx -mno-avx2 -mno-bmi -mno-bmi2" \
-DCMAKE_CXX_FLAGS="-march=sandybridge -mtune=generic -mno-avx -mno-avx2 -mno-bmi -mno-bmi2"
RUN cmake --build whisper.cpp/build --target whisper-server -j"$(nproc)"
FROM ubuntu:24.04
WORKDIR /app
ARG MODEL
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libgomp1 \
libvulkan1 \
mesa-vulkan-drivers && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/whisper.cpp/build/bin/whisper-server /usr/local/bin/whisper-server
COPY ${MODEL} .
EXPOSE 8080
ENTRYPOINT ["whisper-server", "--host", "0.0.0.0", "--port", "8080", "--inference-path", "/v1/audio/transcriptions"]
CMD ["-m", "ggml-large-v3-turbo-q8_0.bin"]