-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
85 lines (74 loc) · 3.62 KB
/
Copy pathDockerfile
File metadata and controls
85 lines (74 loc) · 3.62 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
ARG model=MiniMax-M2.7
ARG base_url=https://api.minimax.io/anthropic
ARG timeout_ms=3000000
FROM python:3.11-slim
WORKDIR /app
# Install all system deps + Node.js in one layer
RUN apt-get update && apt-get install -y \
curl git xz-utils ripgrep ffmpeg gnupg jq \
libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 \
libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \
libxfixes3 libxrandr2 libgbm1 libasound2 \
libpangocairo-1.0-0 libpango-1.0-0 libcairo2 \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g @anthropic-ai/claude-code \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt-get update \
&& apt-get install -y gh \
# Rust (rustc, cargo)
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& apt-get install -y default-jdk default-jre maven \
# Go
&& curl -fsSL https://go.dev/dl/go1.22.2.linux-amd64.tar.gz | tar -C /usr/local -xzf -
# Clone repos with shallow clones
RUN git clone --depth 1 https://github.com/NousResearch/hermes-agent.git /root/.hermes/hermes-agent \
&& curl -fsSL https://astral.sh/uv/install.sh | sh
# Copy SOUL.md into hermes home
COPY SOUL.md /root/.hermes/SOUL.md
# Set environment in one statement
ENV PATH="/root/.npm-global/bin:/usr/local/bin:/usr/bin:/bin:/root/.local/bin:/root/.hermes/hermes-agent:/root/.cargo/bin:/usr/local/go/bin:$PATH"
ENV npm_config_prefix=/root/.npm-global
ENV CARGO_HOME="/root/.cargo"
ENV RUSTUP_HOME="/root/.rustup"
ENV GOPATH="/root/go"
# SSH key for remote VM access (MCP ssh-mcp)
RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh
ENV ANTHROPIC_BASE_URL=${base_url}
ENV ANTHROPIC_AUTH_TOKEN=${MINIMAX_API_KEY}
ENV API_TIMEOUT_MS=${timeout_ms}
ENV CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
ENV ANTHROPIC_MODEL=${model}
ENV ANTHROPIC_SMALL_FAST_MODEL=${model}
ENV ANTHROPIC_DEFAULT_SONNET_MODEL=${model}
ENV ANTHROPIC_DEFAULT_OPUS_MODEL=${model}
ENV ANTHROPIC_DEFAULT_HAIKU_MODEL=${model}
# Python deps + venv in one layer
RUN /root/.local/bin/uv venv /root/.hermes/hermes-agent/venv && \
. /root/.hermes/hermes-agent/venv/bin/activate && \
/root/.local/bin/uv pip install -e /root/.hermes/hermes-agent python-telegram-bot mcp
# Copy skills and install GSD skill
RUN mkdir -p /root/.hermes/skills /root/.claude/skills \
&& cp -r /root/.hermes/hermes-agent/skills/* /root/.hermes/skills/ 2>/dev/null || true \
&& curl -fsSL https://raw.githubusercontent.com/nico-hermes/superpowers/main/skills/gsd \
-o /root/.claude/skills/gsd \
&& curl -fsSL https://raw.githubusercontent.com/nico-hermes/superpowers/main/skills/gsd \
-o /root/.hermes/skills/gsd 2>/dev/null || true
ENTRYPOINT ["/bin/bash", "-c", "\
if [ -f /app/.env ]; then \
mkdir -p ~/.hermes && cp /app/.env ~/.hermes/.env; \
fi && \
# Fix SSH key permissions if present \
if [ -f /root/.ssh/id_rsa ]; then \
chmod 600 /root/.ssh/id_rsa && echo '[Hermes] SSH key permissions fixed'; \
fi && \
echo \"DEBUG args: [$@]\" > /dev/stderr && \
if [ \"x$1\" = \"xclaude\" ]; then \
exec /root/.npm-global/bin/claude \"${@:2}\"; \
fi && \
exec /root/.hermes/hermes-agent/venv/bin/hermes \"$@\""]
CMD []