FROM python:3.9 # Set up a new user named "user" with user id 1000 RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:${PATH}" WORKDIR /app COPY --chown=user . /app RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt # Start the FastAPI app on port 7860 (Hugging Face default) CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]