File size: 1,674 Bytes
2b84626
6d6cbe5
2b84626
 
 
 
 
 
6d6cbe5
2b84626
 
 
 
 
 
 
 
 
 
2ae39dc
2b84626
2ae39dc
 
2b84626
 
 
 
 
 
 
 
 
 
 
 
 
6d6cbe5
2b84626
6d6cbe5
2b84626
6d6cbe5
 
2b84626
 
 
 
 
b67ab05
 
07b85e8
2b84626
07b85e8
2b84626
 
 
 
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
55
56
57
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"]