Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends curl && \ | |
| rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # COPY only ships LFS pointers, not the actual large files. Resolve them | |
| # from HF's LFS-aware /resolve/ URL at build time so the container has the | |
| # real JSON, not the 134-byte pointer. | |
| ARG HF_REPO=zxcvb20001/NeuroOracle | |
| RUN set -e; \ | |
| for f in neurooracle/data/knowledge_graph.json; do \ | |
| if [ -f "$f" ] && head -c 50 "$f" | grep -q '^version https://git-lfs'; then \ | |
| echo "[lfs-fetch] resolving $f from HF"; \ | |
| rm -f "$f"; \ | |
| curl -fsSL "https://huggingface.co/spaces/${HF_REPO}/resolve/main/$f" -o "$f"; \ | |
| echo "[lfs-fetch] $f size=$(stat -c%s "$f") bytes"; \ | |
| fi; \ | |
| done | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |