# Use an official Python image as the base FROM python:3.10-slim # Set the working directory inside the container WORKDIR /app # Copy only essential files first (for better caching) COPY requirements.txt setup.py ./ # Install dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy the entire project into the container COPY . . # Expose the port (modify based on your app) EXPOSE 8080 # Default command to run the application CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]