# Use an official Python runtime as a parent image FROM python:3.9-slim # Set the working directory in the container WORKDIR /app # Copy the current directory contents into the container at /app COPY . /app # Install any needed packages specified in requirements.txt RUN apt-get update && \ apt-get install -y wget gnupg && \ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && \ apt-get update && \ apt-get install -y google-chrome-stable chromium-driver && \ rm -rf /var/lib/apt/lists/* RUN pip install --no-cache-dir -r requirements.txt # Define environment variable ENV PYTHONUNBUFFERED=1 # Run app.py when the container launches CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]