Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Prevent Python from buffering stdout/stderr | |
| ENV PYTHONUNBUFFERED=1 | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies (required for opencv, mediapipe, audio file handling) | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first (better layer caching) | |
| COPY requirements.txt . | |
| # Upgrade pip and install Python dependencies | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy rest of the application | |
| COPY . . | |
| # Expose Hugging Face required port | |
| EXPOSE 7860 | |
| # Start the Flask app | |
| CMD ["python", "app.py"] | |