get-docs-talk / Dockerfile
IsraaMShamkh's picture
Add Bark TTS service for Ebonex storytelling
62d8f5f
Raw History Blame Contribute Delete
564 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
# Pre-download model weights during build (avoids cold start on first request)
RUN python -c "from bark import preload_models; preload_models(text_use_small=True, coarse_use_small=True, fine_use_small=True)" || true
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]