File size: 889 Bytes
eaf27ce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
610204e
 
b525e5e
610204e
b6a35a3
 
 
b525e5e
b6a35a3
610204e
 
eaf27ce
 
 
 
 
 
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
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1

WORKDIR /app

# System deps
RUN apt-get update \
    && apt-get install -y --no-install-recommends nginx ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Install Python deps
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt

# Clear execstack on silero-vad-lite shared library (HF needs this)
RUN apt-get update \
    && apt-get install -y --no-install-recommends patchelf \
    && rm -rf /var/lib/apt/lists/* \
    && python - <<'PY'
import silero_vad_lite, subprocess
so = silero_vad_lite.__file__.replace('__init__.py', 'data/silero_vad_lite.so')
subprocess.check_call(['patchelf', '--clear-execstack', so])
print('cleared execstack on', so)
PY

# Copy app
COPY . /app

EXPOSE 7860

CMD ["/app/docker/start.sh"]