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