# Use official Python slim image FROM python:3.11-slim # Set work directory WORKDIR /app # Install system dependencies RUN apt-get update && \ apt-get install -y --no-install-recommends \ build-essential \ libgl1 \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* # Copy application code COPY final_app.py . # Copy requirements file COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose port EXPOSE 7860 # Run the application CMD ["uvicorn", "final_app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]