FROM python:3.10-slim # Set up user RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:$PATH" WORKDIR /app # Install requirements COPY --chown=user requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY --chown=user . . # Expose the mandatory port for HF Spaces EXPOSE 7860 # Start the Gradio app CMD ["python", "app.py"]