FROM python:3.12.9-slim WORKDIR /app COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt COPY . /app/ # Expose the port the app will run on EXPOSE 7860 # Create and use a non-root user for security RUN useradd -m -u 1000 user USER user # Command to run the application CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"]