# audio.cpp server (0xShug0/audio.cpp) for VibeVoice-ASR-Streaming on nh3-ml1.
# The release's Linux CUDA build ("cuda12.8-colab") is a bare binary that needs the
# CUDA 12 runtime libs (cudart, cublas, cufft, nccl) plus libgomp. This image
# supplies them, plus libsoxr (without it audio.cpp falls back to linear
# resampling for the 16k→24k step). Built locally on the host; not pushed.
FROM nvidia/cuda:12.8.1-runtime-ubuntu22.04
ARG AUDIOCPP_TAG=v0.8.2-audio8-perf-hotfix
ARG AUDIOCPP_SHA256=ccfb35869d67e520801981392189a1ab8b6c829151093e0816ecd6a2d828d8c8
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 libsoxr0 curl ca-certificates \
 && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL -o /tmp/a.tgz "https://github.com/0xShug0/audio.cpp/releases/download/${AUDIOCPP_TAG}/audio-${AUDIOCPP_TAG}-bin-ubuntu-x64-cuda12.8-colab.tar.gz" \
 && echo "${AUDIOCPP_SHA256}  /tmp/a.tgz" | sha256sum -c - \
 && mkdir -p /app && tar xzf /tmp/a.tgz -C /app --no-same-owner && rm /tmp/a.tgz \
 && chmod +x /app/audiocpp_server
WORKDIR /app
ENTRYPOINT ["/app/audiocpp_server"]
