File size: 893 Bytes
803527f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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"]