# Use official python base image FROM python:3.10-slim # Install required system packages RUN apt-get update && apt-get install -y build-essential # Set working directory WORKDIR /code # Copy local files into container COPY requirements.txt . COPY main.py . COPY model.h5 . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose port EXPOSE 7860 # Start the server CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]