# Use the official Python base image FROM python:3.9-slim # Set the working directory in the container WORKDIR /app # Copy the requirements file to the working directory COPY requirements.txt . # Install the Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy the FastAPI application code to the working directory COPY . . # Expose the port that the FastAPI application will run on EXPOSE 8000 # Start the FastAPI application CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]