# Use an official lightweight Python image FROM python:3.12 # Set working directory WORKDIR /app # Copy the requirements file and install dependencies COPY requirements.txt . RUN pip install -r requirements.txt # Copy the FastAPI and model files COPY main.py backend.py ./ # Expose the port for FastAPI EXPOSE 8000 # Run the FastAPI server using Uvicorn CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]