retro-cpu / Dockerfile
d1d4c's picture
feat(bruno/v1): ontology-governed memory — Dockerfile (gate accept-bruno-v1-gate-20260621)
9454c88 verified
Raw History Blame Contribute Delete
888 Bytes
FROM python:3.11-slim
# HF Dev Mode injects an SSH server + VS Code layer that requires git (and a few
# common utilities) to be present in the image. python:*-slim ships without them,
# so install them up front or the Dev Mode build fails at `git config` (exit 127).
RUN apt-get update && apt-get install -y --no-install-recommends \
git curl ca-certificates procps \
&& rm -rf /var/lib/apt/lists/*
# HF Spaces runs as a non-root user (uid 1000) by convention.
RUN useradd -m -u 1000 user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
PYTHONUNBUFFERED=1
WORKDIR /home/user/app
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user bruno_v1.json .
COPY --chown=user bruno_graph.py .
COPY --chown=user app.py .
USER user
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]