chore(voice): make NPU Whisper the default
This commit is contained in:
+58
-14
@@ -37,7 +37,7 @@ services:
|
||||
whisper-init:
|
||||
image: ghcr.io/ggml-org/whisper.cpp@sha256:672650b5e67f9cb86af7ac6e09dea8eac12a024086e1e5c0172fdccf336aba09
|
||||
container_name: whisper-init
|
||||
profiles: ["voice"]
|
||||
profiles: ["voice", "voice-cpu-backup"]
|
||||
restart: "no"
|
||||
volumes:
|
||||
- whisper-models:/app/models
|
||||
@@ -54,17 +54,15 @@ services:
|
||||
fi
|
||||
done
|
||||
|
||||
# Primary whisper.cpp server: NVIDIA RTX 5070 Ti via CUDA (Blackwell sm_120).
|
||||
# Uses ggml-base.bin to keep the service alive while llama-server owns most of
|
||||
# the laptop GPU VRAM. The previous ggml-small.bin profile needed ~465 MiB
|
||||
# contiguous CUDA memory and restarted when only ~560 MiB fragmented VRAM was
|
||||
# free. CPU whisper-server below remains the higher-accuracy fallback.
|
||||
# Manual GPU whisper.cpp fallback: NVIDIA RTX 5070 Ti via CUDA (Blackwell sm_120).
|
||||
# Kept out of the normal `voice` profile because the OpenVINO NPU Whisper
|
||||
# service is the default and this container consumes GPU resources.
|
||||
#
|
||||
# The official `ghcr.io/ggml-org/whisper.cpp:main-cuda` ships kernels only
|
||||
# for sm_75/80/86/90 and fails to init CUDA on Blackwell. We build a custom
|
||||
# image with `CMAKE_CUDA_ARCHITECTURES=120` from the local Dockerfile.
|
||||
# Build manually with: docker build -t whisper.cpp:cuda-blackwell ./whisper-cuda-blackwell
|
||||
# Or `docker compose --profile voice build whisper-server-gpu`.
|
||||
# Or `docker compose --profile voice-gpu build whisper-server-gpu`.
|
||||
whisper-server-gpu:
|
||||
image: whisper.cpp:cuda-blackwell
|
||||
build:
|
||||
@@ -72,7 +70,7 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
container_name: whisper-server-gpu
|
||||
restart: unless-stopped
|
||||
profiles: ["voice"]
|
||||
profiles: ["voice-gpu"]
|
||||
ports:
|
||||
- "18801:8080"
|
||||
volumes:
|
||||
@@ -115,16 +113,62 @@ services:
|
||||
agentmon.role: "voice"
|
||||
agentmon.port: "18801"
|
||||
|
||||
# Fallback whisper.cpp server: CPU-only, medium model.
|
||||
# Kept around for resilience — runs if the GPU server is down (driver issue,
|
||||
# gemma takes all VRAM, custom image broken, etc.). Uses no GPU resources.
|
||||
# ~14 s per short clip (medium-on-CPU is 90x slower than small-on-GPU above).
|
||||
# Start with: docker compose --profile voice up -d whisper-server
|
||||
# Experimental OpenVINO GenAI Whisper server using the Intel NPU.
|
||||
# This is not whisper.cpp; it implements the same OpenAI-style
|
||||
# /v1/audio/transcriptions route using OpenVINO WhisperPipeline on NPU.
|
||||
# Host requirements: intel-npu-driver-bin installed, /dev/accel/accel0 present,
|
||||
# and the host NPU Level Zero driver/compiler libraries mounted below.
|
||||
whisper-server-npu:
|
||||
image: whisper-openvino-npu:local
|
||||
build:
|
||||
context: ./whisper-openvino-npu
|
||||
dockerfile: Dockerfile
|
||||
container_name: whisper-server-npu
|
||||
restart: unless-stopped
|
||||
profiles: ["voice"]
|
||||
ports:
|
||||
- "18816:8080"
|
||||
devices:
|
||||
- /dev/accel/accel0:/dev/accel/accel0
|
||||
group_add:
|
||||
- "987" # host render group gid on willlaptop
|
||||
environment:
|
||||
- WHISPER_DEVICE=NPU
|
||||
- WHISPER_MODEL_DIR=/models/whisper-tiny-fp16-ov
|
||||
- LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
|
||||
- ZE_ENABLE_ALT_DRIVERS=/usr/lib/x86_64-linux-gnu/libze_intel_npu.so.1
|
||||
volumes:
|
||||
- /home/will/.cache/openvino-models/whisper-tiny-fp16-ov:/models/whisper-tiny-fp16-ov:ro
|
||||
- /usr/lib/x86_64-linux-gnu/libze_intel_npu.so.1.32.1:/usr/lib/x86_64-linux-gnu/libze_intel_npu.so.1.32.1:ro
|
||||
- /usr/lib/x86_64-linux-gnu/libze_intel_npu.so.1:/usr/lib/x86_64-linux-gnu/libze_intel_npu.so.1:ro
|
||||
- /usr/lib/x86_64-linux-gnu/libze_intel_npu.so:/usr/lib/x86_64-linux-gnu/libze_intel_npu.so:ro
|
||||
- /usr/lib/x86_64-linux-gnu/libnpu_driver_compiler.so:/usr/lib/x86_64-linux-gnu/libnpu_driver_compiler.so:ro
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"curl -f http://localhost:8080/health >/dev/null 2>&1 || exit 1",
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 30s
|
||||
retries: 3
|
||||
labels:
|
||||
agentmon.monitor: "true"
|
||||
agentmon.role: "voice"
|
||||
agentmon.port: "18816"
|
||||
|
||||
# Manual fallback whisper.cpp server: CPU-only, medium model.
|
||||
# Kept around for resilience — runs if the NPU/GPU servers are down. Uses no
|
||||
# accelerator resources, but is slow (~14 s per short clip).
|
||||
# Disabled from the normal `voice` profile now that `whisper-server-npu` is
|
||||
# the trial default. Start manually with:
|
||||
# docker compose --profile voice-cpu-backup up -d whisper-server
|
||||
whisper-server:
|
||||
image: ghcr.io/ggml-org/whisper.cpp@sha256:672650b5e67f9cb86af7ac6e09dea8eac12a024086e1e5c0172fdccf336aba09
|
||||
container_name: whisper-server
|
||||
restart: unless-stopped
|
||||
profiles: ["voice"]
|
||||
profiles: ["voice-cpu-backup"]
|
||||
ports:
|
||||
- "18811:8080"
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user