Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| build-essential \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install uv for fast package management | |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | |
| # Copy project files | |
| COPY pyproject.toml . | |
| COPY README.md . | |
| COPY pocket_tts ./pocket_tts | |
| # Install dependencies | |
| RUN uv pip install --system --no-cache -e . | |
| # Create a non-root user (required for HF Spaces) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Expose the port (HF Spaces uses 7860) | |
| EXPOSE 7860 | |
| # Command to run the application | |
| # Note: We bind to 0.0.0.0 and port 7860 | |
| CMD ["python", "-m", "pocket_tts.main", "serve", "--host", "0.0.0.0", "--port", "7860"] | |