Files
meetrec/server/whisper-server/Dockerfile
T
fegger ce1880dc90 whisper-server: move to port 8085 (8080 taken on the host)
Consistent across compose, entrypoint default, Dockerfile EXPOSE,
healthcheck, and README examples.
2026-09-07 12:27:44 +02:00

43 lines
1.6 KiB
Docker

# whisper.cpp inference server for meetrec.
#
# Built from the same pinned whisper.cpp release (v1.9.3) as the Android
# app's JNI layer, compiled statically WITH the Vulkan GPU backend for
# AMD GPUs (Radeon AI PRO R9700 / RDNA, also NVIDIA/Intel). Without a GPU
# present it transparently falls back to CPU.
#
# Note: ggml builds with -march=native by default, so build the image ON
# the machine that will run it (docker compose build on the server).
FROM debian:12-slim AS build
RUN apt-get update && apt-get install -y --no-install-recommends \
git cmake build-essential ca-certificates curl \
libvulkan-dev glslang-tools \
&& rm -rf /var/lib/apt/lists/*
ARG WHISPER_TAG=v1.9.3
RUN git clone --depth 1 --branch ${WHISPER_TAG} \
https://github.com/ggml-org/whisper.cpp /src
RUN cmake -S /src -B /src/build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DWHISPER_BUILD_EXAMPLES=ON \
-DWHISPER_BUILD_TESTS=OFF \
-DWHISPER_BUILD_SERVER=ON \
-DWHISPER_VULKAN=ON \
&& cmake --build /src/build --target whisper-server -j"$(nproc)"
FROM debian:12-slim
# libvulkan1 + mesa-vulkan-drivers: the AMD RADV Vulkan driver used by
# the R9700. GPU access is granted via /dev/dri in docker-compose.yml.
RUN apt-get update && apt-get install -y --no-install-recommends \
libgomp1 ca-certificates curl libvulkan1 mesa-vulkan-drivers \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /src/build/bin/whisper-server /usr/local/bin/whisper-server
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 8085
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]