File size: 1,375 Bytes
2b9a95b | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
# System dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl unzip python3 python3-pip jq ca-certificates bc git iptables \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& rm -rf /var/lib/apt/lists/*
# Install Bun (OpenCode runtime)
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:$PATH"
# Install Node.js 20
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install OpenCode
RUN npm i -g opencode-ai@latest
# Python analysis packages (only numpy + pandas for agent)
RUN pip3 install --break-system-packages pandas numpy
# ── System files (agent cannot see these) ──
# SSE bridge + mission runner
COPY opencode-workspace/sse-bridge.ts /opt/system/sse-bridge.ts
COPY opencode-workspace/run-mission.py /opt/system/run-mission.py
# Experiment configs (only used by entrypoint to generate MISSION.md)
COPY experiments/ /opt/system/experiments/
# Entrypoint
COPY opencode-workspace/entrypoint.sh /opt/system/entrypoint.sh
RUN chmod +x /opt/system/entrypoint.sh
# ── Agent workspace (clean, only what agent should see) ──
WORKDIR /workspace
RUN mkdir -p /workspace/agent_records
EXPOSE 4096
ENTRYPOINT ["/opt/system/entrypoint.sh"]
CMD ["serve"]
|