| | FROM python:3.11-slim |
| |
|
| | WORKDIR /app |
| |
|
| | ENV PYTHONDONTWRITEBYTECODE=1 \ |
| | PYTHONUNBUFFERED=1 \ |
| | PORT=7860 |
| |
|
| | |
| | RUN apt-get update && apt-get install -y gcc curl && rm -rf /var/lib/apt/lists/* |
| |
|
| | |
| | COPY ttsfm/ ./ttsfm/ |
| | COPY ttsfm-web/ ./ttsfm-web/ |
| | COPY pyproject.toml ./ |
| | COPY requirements.txt ./ |
| |
|
| | |
| | RUN pip install --no-cache-dir -e .[web] |
| |
|
| | |
| | RUN pip install --no-cache-dir python-dotenv>=1.0.0 |
| |
|
| | |
| | RUN useradd --create-home ttsfm && chown -R ttsfm:ttsfm /app |
| | USER ttsfm |
| |
|
| |
|
| |
|
| | HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ |
| | CMD curl -f http://localhost:7860/api/health || exit 1 |
| |
|
| | WORKDIR /app/ttsfm-web |
| | CMD ["python", "-m", "waitress", "--host=0.0.0.0", "--port=7860", "app:app"] |
| |
|