# Use a lightweight Python base image FROM python:3.10-slim # set the working directory inside the container WORKDIR /code # copy just the requirements first to cache the installations COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY . . # Hugging Face routes traffic to port 7860 EXPOSE 7860 # boot up the server CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]