krinya/smart_routing_with_render_example
0
1# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker2# you will also find guides on how best to write your Dockerfile3 4FROM python:3.12-slim5 6# Set working directory7WORKDIR /app8 9# Create user10RUN useradd -m -u 1000 user11 12# Copy dependency files first (for better caching)13COPY --chown=user ./requirements.txt requirements.txt14 15# Install dependencies using pip (more reliable for HF Spaces)16RUN pip install --no-cache-dir --upgrade pip17RUN pip install --no-cache-dir -r requirements.txt18 19# Copy application files20COPY --chown=user . /app21 22# Switch to user23USER user24 25# Expose port26EXPOSE 786027 28# Run the Gradio app29CMD ["python", "app.py"]