# Use an official Python runtime as a parent image FROM python:3.9-slim # Set the working directory in the container WORKDIR /code # Copy the requirements.txt file into the container at /app COPY requirements.txt . # Install any dependencies specified in requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy the current directory contents into the container at /app COPY . . # Command to run the FastAPI app using Uvicorn with live-reload CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]