FROM python:3.11-slim WORKDIR /app # Install system dependencies (including matplotlib and playwright dependencies) RUN apt-get update && apt-get install -y \ gcc \ g++ \ libfreetype6-dev \ libpng-dev \ libjpeg-dev \ zlib1g-dev \ libglib2.0-0 \ libnss3 \ libnspr4 \ libatk1.0-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libdbus-1-3 \ libxkbcommon0 \ libxcomposite1 \ libxdamage1 \ libxfixes3 \ libxrandr2 \ libgbm1 \ libpango-1.0-0 \ libcairo2 \ libasound2 \ libatspi2.0-0 \ libxshmfence1 \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Create data directory for SQLite RUN mkdir -p data # Expose port EXPOSE 8000 # Run the application CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]