ASR_Streaming_Server / Dockerfile
Piyazon
rebuild
2ae39dc
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PATH="/home/user/.local/bin:$PATH" \
HF_HOME="/home/user/.cache/huggingface" \
WHISPER_CACHE_DIR="/home/user/.cache/whisper"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ffmpeg \
git \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
ARG WHISPERLIVEKIT_REPO="https://github.com/Alimjoo/WhisperLiveKit-ug.git"
ARG WHISPERLIVEKIT_REF=""
ARG WHISPERLIVEKIT_CACHE_BUST="2026-05-01-1"
RUN echo "WhisperLiveKit cache bust: ${WHISPERLIVEKIT_CACHE_BUST}" \
&& git clone --depth 1 "${WHISPERLIVEKIT_REPO}" /opt/WhisperLiveKit-ug \
&& if [ -n "${WHISPERLIVEKIT_REF}" ]; then \
cd /opt/WhisperLiveKit-ug \
&& git fetch --depth 1 origin "${WHISPERLIVEKIT_REF}" \
&& git checkout FETCH_HEAD; \
fi
WORKDIR /opt/WhisperLiveKit-ug
RUN pip install --upgrade pip setuptools wheel \
&& pip install -e .
RUN useradd -m -u 1000 user \
&& mkdir -p /app /home/user/models "${HF_HOME}" "${WHISPER_CACHE_DIR}" \
&& chown -R user:user /app /home/user /opt/WhisperLiveKit-ug
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY --chown=user . /app
RUN chmod +x /app/start.sh
USER user
ENV HF_MODEL_REPO="piyazon/whisper_uyghur_pt" \
HF_MODEL_FILENAMES="uyghur_whisper_tiny.pt" \
WHISPER_MODEL_FILENAME="uyghur_whisper_tiny.pt" \
WHISPER_LANGUAGE="uz" \
WHISPER_BACKEND="whisper" \
WHISPER_BACKEND_POLICY="localagreement" \
PORT="7860"
EXPOSE 7860
CMD ["/app/start.sh"]