Spaces:
Paused
Paused
| FROM python:3.9-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements first to leverage Docker cache | |
| COPY requirements.txt . | |
| # Install system dependencies and Python packages | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| ffmpeg \ | |
| libglib2.0-0 \ | |
| && pip install --no-cache-dir -r requirements.txt \ | |
| && apt-get remove -y build-essential \ | |
| && apt-get autoremove -y \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the application code | |
| COPY . . | |
| # Expose the port | |
| EXPOSE 7860 | |
| # Command to run the application | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |