Spaces:
Running
Running
| 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"] | |