| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsndfile1 \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first for caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY . . | |
| # Create necessary directories | |
| RUN mkdir -p /app/output /app/uploads | |
| # Expose port (HuggingFace Spaces uses 7860) | |
| EXPOSE 7860 | |
| # Run the server | |
| CMD ["python", "api_server.py"] | |