# Base image FROM python:3.10-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Set work directory WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ git \ ffmpeg \ libsm6 \ libxext6 \ && rm -rf /var/lib/apt/lists/* # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy project files COPY . . # Expose port EXPOSE 7860 # Run the app CMD ["python", "app.py"]