FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive ENV OLLAMA_HOST=0.0.0.0:11434 ENV OLLAMA_MODELS=/root/.ollama/models ENV BASECAMP_MODEL=llama3.1:8b # ── System deps ── # xz-utils is required by the Hermes installer (Node.js .tar.xz archive) # The FIXER TOOLBOX: every CLI basecamp hermes needs to actually EXECUTE # fixes, not just describe them (databases, docker, yaml, networking). RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip curl wget git ca-certificates xz-utils zstd \ supervisor procps jq gnupg \ # database clients — postgres/pgvector, sqlite, redis postgresql-client sqlite3 redis-tools \ # docker CLI + compose plugin (for managing the stack when the # docker socket is mounted into basecamp) docker.io docker-compose-v2 \ # network diagnostics — the fixer must be able to SEE the network iputils-ping dnsutils netcat-openbsd lsof \ # misc surgical tools htop unzip file \ && rm -rf /var/lib/apt/lists/* \ # yq (yaml editor) — not in Ubuntu 22.04 apt; official static binary && curl -fsSL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64" \ && chmod +x /usr/local/bin/yq \ # mongosh (mongo shell) — 'mongodb-clients' doesn't exist on 22.04; # install the official shell from MongoDB's apt repo instead. && curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb.gpg \ && echo "deb [signed-by=/usr/share/keyrings/mongodb.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" > /etc/apt/sources.list.d/mongodb.list \ && apt-get update && apt-get install -y --no-install-recommends mongodb-mongosh \ && rm -rf /var/lib/apt/lists/* # ── Install Ollama ── RUN curl -fsSL https://ollama.com/install.sh | sh # ── Install Hermes Agent ── # Official installer (root-mode FHS layout -> /usr/local/bin/hermes, data -> /root/.hermes). # WARNING: do NOT `pip3 install hermes-cli` — that PyPI package is an unrelated # 0.0.1.x stub, NOT Hermes Agent. Use the official installer only. # --skip-browser keeps the image lean; browser tooling can be added later. RUN curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --skip-browser ENV PATH="/usr/local/bin:/root/.local/bin:${PATH}" # ── Basecamp discovery + tools ── RUN mkdir -p /opt/basecamp COPY discover.py /opt/basecamp/discover.py COPY recipes.py /opt/basecamp/recipes.py COPY tavern.sh /opt/basecamp/tavern.sh COPY tavern_mcp.py /opt/basecamp/tavern_mcp.py COPY skins/ /opt/basecamp/skins/ COPY SOUL.md /opt/basecamp/SOUL.md RUN chmod +x /opt/basecamp/discover.py /opt/basecamp/tavern.sh /opt/basecamp/tavern_mcp.py # ── MCP SDK — required by hermes's native MCP client to connect to the # tavern MCP server (tavern_mcp.py) and expose the connectivity toolkit # as first-class tools (mcp_tavern_status, self_check, wire, ...). ── RUN pip3 install --no-cache-dir --break-system-packages mcp 2>/dev/null \ || pip3 install --no-cache-dir mcp # ── Supervisor config (Ollama only — Hermes is exec'd by the entrypoint) ── COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf # ── Entrypoint ── COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh EXPOSE 11434 WORKDIR /root ENTRYPOINT ["/entrypoint.sh"]