# Use official Python image as a base FROM python:3.9-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 # Set working directory WORKDIR /app # Copy the FastAPI app and model COPY . /app # Install required libraries RUN pip install --no-cache-dir -r requirements.txt # Expose the port for the app EXPOSE 8000 # Command to run the app CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]