# Pathify — container for free hosting (e.g. Hugging Face Spaces, Docker SDK). FROM python:3.10-slim WORKDIR /app # CPU-only PyTorch + light deps (no CUDA, keeps the image small). RUN pip install --no-cache-dir torch==2.4.1 torchvision==0.19.1 \ --index-url https://download.pytorch.org/whl/cpu \ && pip install --no-cache-dir pillow numpy h5py COPY . . # Writable, ephemeral locations so it runs even as a non-root container user. ENV PYTHONPATH=/app:/app/backend \ OMP_NUM_THREADS=2 \ PATHQA_AUDIT_LOG=/tmp/audit_log.jsonl \ PATHQA_FEEDBACK_DIR=/tmp/feedback EXPOSE 7860 # Bind to 0.0.0.0 so the host can reach it. Small demo cohort = fast boot. CMD ["python", "backend/server.py", "--host", "0.0.0.0", "--port", "7860", \ "--cases", "60", "--slides", "4", "--slide-grid", "12", "--demo-train-steps", "2"]