CoolFace
Apppublic

samu/schematic-drawing

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
Dockerfile26 linesDownload Raw Back to root
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# Update system packages to reduce vulnerabilities7RUN apt-get update && apt-get upgrade -y && apt-get clean && rm -rf /var/lib/apt/lists/*8 9# Required for Hugging Face Spaces Dev Mode functionality10RUN useradd -m -u 1000 user11WORKDIR /app12 13COPY --chown=user ./requirements.txt requirements.txt14RUN pip install --no-cache-dir --upgrade -r requirements.txt15 16COPY --chown=user . /app17 18# Create and set permissions for logs directory in /tmp19RUN mkdir -p /tmp/schematic_ai_logs && \20    chown user:user /tmp/schematic_ai_logs21 22USER user23 24# Use Hugging Face's default port 786025CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]26