-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
173 lines (151 loc) · 4.79 KB
/
docker-compose.yml
File metadata and controls
173 lines (151 loc) · 4.79 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
services:
researcher:
build:
context: .
dockerfile: Dockerfile
container_name: protoresearcher
hostname: sandbox
restart: unless-stopped
# NemoClaw-inspired security
security_opt:
- no-new-privileges:true
- seccomp=seccomp-profile.json
cap_drop:
- ALL
cap_add:
- NET_RAW
read_only: true
# Writable mounts (tmpfs = ephemeral)
tmpfs:
- /tmp:size=512M,uid=1001,gid=1001
- /run:size=64M
- /sandbox:size=512M,uid=1001,gid=1001
- /home/sandbox:size=128M,uid=1001,gid=1001
# Persistent volumes
volumes:
- protoresearcher-knowledge:/sandbox/knowledge
- protoresearcher-audit:/sandbox/audit
- protoresearcher-papers:/sandbox/papers
- protoresearcher-cron:/opt/.cron
# Config (bind-mount for APO prompt optimization)
- ./config:/opt/protoresearcher/config:rw
ports:
- "7872:7870"
# Network: host vLLM + Ollama access
extra_hosts:
- "host.docker.internal:host-gateway"
# Resource limits
deploy:
resources:
limits:
cpus: "4"
memory: 4G
reservations:
memory: 512M
environment:
- HOME=/home/sandbox
- AGENT_BACKEND=${AGENT_BACKEND:-langgraph}
- OPENAI_API_KEY=${LITELLM_MASTER_KEY:-}
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:-}
# Langfuse tracing (optional)
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-}
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-}
- LANGFUSE_HOST=${LANGFUSE_HOST:-http://host.docker.internal:3001}
# GitHub (optional, for higher API rate limits)
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
# Discord (optional, for reading channel feeds)
- DISCORD_BOT_TOKEN=${DISCORD_RESEARCH_BOT:-}
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL:-}
# Instance identity (for multi-node collaboration)
- INSTANCE_NAME=${INSTANCE_NAME:-ava}
# Rabbit Hole integration
- MCP_AUTH_TOKEN=${MCP_AUTH_TOKEN:-}
- RABBIT_HOLE_URL=${RABBIT_HOLE_URL:-http://host.docker.internal:3399}
# A2A authentication — workstacean sends this as X-API-Key
- RESEARCHER_API_KEY=${RESEARCHER_API_KEY:-}
stdin_open: true
tty: true
networks:
default:
gateway:
aliases:
- researcher # workstacean resolves http://researcher:7870/a2a via ai_default
command: ["/opt/protoresearcher/entrypoint.sh"]
# Lab mode — GPU-enabled researcher with training capabilities
# Usage: docker compose --profile lab up --build
researcher-lab:
build:
context: .
dockerfile: Dockerfile
target: lab
container_name: protoresearcher-lab
hostname: sandbox
restart: unless-stopped
profiles:
- lab
# Relaxed security for CUDA (GPU needs syscalls seccomp blocks)
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_RAW
tmpfs:
- /tmp:size=1G,uid=1001,gid=1001
- /run:size=64M
- /sandbox:size=1G,uid=1001,gid=1001
- /home/sandbox:size=256M,uid=1001,gid=1001
volumes:
- protoresearcher-knowledge:/sandbox/knowledge
- protoresearcher-audit:/sandbox/audit
- protoresearcher-papers:/sandbox/papers
- protoresearcher-lab:/sandbox/lab
- protoresearcher-cron:/opt/.cron
# Host mounts for training
- /mnt/models/huggingface:/mnt/models/huggingface:ro
- /home/ava/dev/LLaMA-Factory:/opt/llama-factory:ro
- /home/ava/dev/lab/training/data:/opt/lab-data:ro
- /mnt/data/training/researcher:/mnt/data/training/researcher
# Claude OAuth credentials (read-only)
- ${HOME}/.claude:/opt/claude-creds:ro
ports:
- "7870:7870"
extra_hosts:
- "host.docker.internal:host-gateway"
# GPU access
deploy:
resources:
limits:
cpus: "8"
memory: 16G
reservations:
memory: 2G
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
- HOME=/home/sandbox
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- LAB_GPU=${LAB_GPU:-1}
- HF_HOME=/mnt/models/huggingface
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-}
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-}
- LANGFUSE_HOST=${LANGFUSE_HOST:-http://host.docker.internal:3001}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN:-}
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL:-}
- INSTANCE_NAME=${INSTANCE_NAME:-protolabs}
stdin_open: true
tty: true
command: ["/opt/protoresearcher/entrypoint.sh"]
networks:
gateway:
external: true
name: ai_default
volumes:
protoresearcher-knowledge:
protoresearcher-audit:
protoresearcher-papers:
protoresearcher-cron:
protoresearcher-lab: