FROM python:3.9 # Set the working directory WORKDIR /app # Copy the requirements.txt into the container COPY requirements.txt . # Install the dependencies listed in requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy your FastAPI app files into the container COPY . . # Expose the port for the FastAPI app EXPOSE 8000 # Command to run the FastAPI app with Uvicorn CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]