File size: 6,088 Bytes
d80fc82
d51edae
 
 
190dfb8
4e34289
190dfb8
4e34289
 
844d8b8
4e34289
 
b83cb91
190dfb8
4e34289
2c2651e
d9e0f07
190dfb8
 
4e34289
d51edae
bf23d1f
 
 
 
d51edae
2c2651e
 
bdc7021
 
 
 
 
 
 
2c2651e
4e34289
d51edae
2c2651e
bdc7021
 
 
 
 
 
 
 
2c2651e
4e34289
718b531
4e34289
 
190dfb8
 
a7746cb
844d8b8
 
4795024
47f9a0d
07df346
 
5cd7ce4
d0088e6
 
2a70ca5
4d85c26
c376717
 
 
c37a9bc
2a70ca5
5cd7ce4
 
 
 
49e3c8a
c376717
 
 
27533f4
15c8440
 
 
 
 
 
 
 
 
 
 
e7e04b2
15c8440
 
 
 
 
 
 
e7e04b2
15c8440
 
 
 
 
 
 
 
 
 
 
 
e7e04b2
15c8440
 
 
 
 
 
 
e7e04b2
15c8440
 
 
 
e7e04b2
 
 
 
 
 
 
 
bdc7021
2f4c2db
2c2651e
 
2f4c2db
 
 
 
bdc7021
2f4c2db
2c2651e
 
2f4c2db
2c2651e
2f4c2db
 
 
d51edae
190dfb8
d51edae
4e34289
d51edae
27533f4
 
 
 
b83cb91
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
FROM python:3.13-slim

WORKDIR /app

# Install runtime system packages and OpenClaw.
RUN apt-get update && apt-get install -y --no-install-recommends \
    bash \
    curl \
    ca-certificates \
    caddy \
    ffmpeg \
    git \
    supervisor \
    && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
    && apt-get install -y --no-install-recommends nodejs \
    && npm install -g openclaw \
    && command -v openclaw \
    && openclaw --help >/dev/null 2>&1 \
    && node --version \
    && rm -rf /var/lib/apt/lists/*

# Python dependencies via uv + pyproject.toml.
RUN pip install --no-cache-dir uv
COPY pyproject.toml /app/pyproject.toml
RUN uv sync --no-dev

# Odysseus (https://github.com/pewdiepie-archdaemon/odysseus): a self-hosted
# FastAPI/uvicorn AI workspace — not an npm package (the npm "odysseus" package
# is unrelated). Disabled at build time for now: cloning + installing its
# requirements (cryptography, fastembed/onnxruntime, chromadb-client, mcp, ...)
# is heavy and untested on a free-tier Space, and broke the restart cycle once
# already. Re-enable (and flip ODYSSEUS_ENABLED=1 below) only after validating
# this build step locally with `docker build`.
# RUN git clone https://github.com/pewdiepie-archdaemon/odysseus.git /app/odysseus \
#     && pip install --no-cache-dir -r /app/odysseus/requirements.txt

COPY . /app

# Agent OS (https://github.com/buildermethods/agent-os): a project-scaffolding
# tool, not a service — it has no daemon/port. Disabled at build time for now:
# project-install.sh is a third-party script of unknown behavior in a
# non-interactive container (expects a git repo, may prompt, etc.) and broke
# the restart cycle once already. Re-enable (and flip AGENT_OS_ENABLED=1 below)
# only after validating this build step locally with `docker build`.
# RUN git clone https://github.com/buildermethods/agent-os.git /root/agent-os \
#     && rm -rf /root/agent-os/.git \
#     && cd /app && bash /root/agent-os/scripts/project-install.sh

ENV PORT=7860
ENV OPENCLAW_PORT=18789
ENV OPENCLAW_BIN=openclaw
ENV VAULT_PATH=/app/vault
ENV OPENCLAW_HOME=/app/.openclaw
ENV OPENCLAW_STATE_DIR=/app/.openclaw/state
ENV AUTO_START_GATEWAY=0
ENV EXTERNAL_GATEWAY_MANAGED=1
ENV OPENCLAW_STANDARD_UI_PUBLIC_URL=/openclaw/
ENV OPENCLAW_GATEWAY_LOG_PATH=/tmp/openclaw-gateway.log
ENV OPENCLAW_GATEWAY_ERR_LOG_PATH=/tmp/openclaw-gateway.err.log
ENV OPENCLAW_DISABLE_BONJOUR=1
ENV OPENCLAW_DISABLE_MDNS=1
ENV OPENCLAW_ONBOARD_NONINTERACTIVE=0
ENV OPENCLAW_CUSTOM_BASE_URL=https://researchengineering-agi.hf.space/v1
ENV OPENCLAW_CUSTOM_MODEL_ID=deepseek-chat
ENV OPENCLAW_CUSTOM_PROVIDER_ID=researchengineering-agi-hf-space
ENV OPENCLAW_CUSTOM_COMPATIBILITY=openai
ENV OPENCLAW_CUSTOM_API_KEY=
ENV OPENCLAW_CUSTOM_API_KEY_OPTIONAL=1
ENV OPENCLAW_CUSTOM_API_KEY_PLACEHOLDER=no-key
ENV OPENCLAW_GATEWAY_BIND=lan
ENV OPENCLAW_BOOTSTRAP_ONBOARD=1
ENV OPENCLAW_CONTROL_UI_BASE_PATH=/openclaw
ENV OPENCLAW_ALLOWED_ORIGINS=https://researchengineering-agi-assistant.hf.space,http://127.0.0.1:7860,http://localhost:7860
ENV OPENCLAW_TRUSTED_PROXIES=127.0.0.1,::1
ENV OPENCLAW_CONTROL_UI_ALLOW_INSECURE_AUTH=1
ENV OPENCLAW_CONTROL_UI_DISABLE_DEVICE_AUTH=1
ENV STREAMLIT_AUTH_ENABLED=1
ENV STREAMLIT_AUTH_USERNAME=
ENV STREAMLIT_AUTH_PASSWORD=
ENV LLAMA_SERVER_CTX_SIZE=8192
ENV NANOCLAW_ENABLED=1
ENV NANOCLAW_PORT=18889
ENV NANOCLAW_CMD=nanoclaw
ENV NANOCLAW_ARGS=
ENV NANOCLAW_BASE_PATH=/nanoclaw
ENV NANOCLAW_CONFIG_PATH=/app/nanoclaw.json
ENV NANOCLAW_LOG_PATH=/tmp/nanoclaw.log
ENV NANOCLAW_ERR_LOG_PATH=/tmp/nanoclaw.err.log
ENV NANOBOT_ENABLED=1
ENV NANOBOT_PORT=18790
ENV NANOBOT_CMD=nanobot
ENV NANOBOT_ARGS="gateway --port 18790"
ENV NANOBOT_BASE_PATH=/nanobot
ENV NANOBOT_CONFIG_PATH=/app/nanobot.json
ENV NANOBOT_LOG_PATH=/tmp/nanobot.log
ENV NANOBOT_ERR_LOG_PATH=/tmp/nanobot.err.log
ENV PICOCLAW_ENABLED=1
ENV PICOCLAW_PORT=18792
ENV PICOCLAW_CMD=picoclaw
ENV PICOCLAW_ARGS="gateway --port 18792"
ENV PICOCLAW_BASE_PATH=/picoclaw
ENV PICOCLAW_CONFIG_PATH=/app/picoclaw.json
ENV PICOCLAW_LOG_PATH=/tmp/picoclaw.log
ENV PICOCLAW_ERR_LOG_PATH=/tmp/picoclaw.err.log
ENV IRONCLAW_ENABLED=1
ENV IRONCLAW_CMD=ironclaw
ENV IRONCLAW_ARGS=
ENV IRONCLAW_LOG_PATH=/tmp/ironclaw.log
ENV IRONCLAW_ERR_LOG_PATH=/tmp/ironclaw.err.log
ENV ZEROCLAW_ENABLED=1
ENV ZEROCLAW_PORT=42617
ENV ZEROCLAW_CMD=zeroclaw
ENV ZEROCLAW_ARGS="gateway --port 42617"
ENV ZEROCLAW_BASE_PATH=/zeroclaw
ENV ZEROCLAW_CONFIG_PATH=/app/zeroclaw.json
ENV ZEROCLAW_LOG_PATH=/tmp/zeroclaw.log
ENV ZEROCLAW_ERR_LOG_PATH=/tmp/zeroclaw.err.log
ENV NULLCLAW_ENABLED=1
ENV NULLCLAW_PORT=3000
ENV NULLCLAW_CMD=nullclaw
ENV NULLCLAW_ARGS="gateway --port 3000"
ENV NULLCLAW_BASE_PATH=/nullclaw
ENV NULLCLAW_CONFIG_PATH=/app/nullclaw.json
ENV NULLCLAW_LOG_PATH=/tmp/nullclaw.log
ENV NULLCLAW_ERR_LOG_PATH=/tmp/nullclaw.err.log
ENV NEMOCLAW_ENABLED=1
ENV NEMOCLAW_PORT=18793
ENV NEMOCLAW_CMD=openshell
ENV NEMOCLAW_ARGS="sandbox create --from openclaw"
ENV NEMOCLAW_BASE_PATH=/nemoclaw
ENV NEMOCLAW_CONFIG_PATH=/app/nemoclaw.json
ENV NEMOCLAW_LOG_PATH=/tmp/nemoclaw.log
ENV NEMOCLAW_ERR_LOG_PATH=/tmp/nemoclaw.err.log
ENV AGENT_OS_ENABLED=0
ENV AGENT_OS_PORT=18795
ENV AGENT_OS_CMD=python3
ENV AGENT_OS_ARGS=/app/scripts/agent_os_status_server.py
ENV AGENT_OS_BASE_PATH=/agent-os
ENV AGENT_OS_CONFIG_PATH=/app/agent-os.json
ENV AGENT_OS_LOG_PATH=/tmp/agent-os.log
ENV AGENT_OS_ERR_LOG_PATH=/tmp/agent-os.err.log
ENV ODYSSEUS_ENABLED=0
ENV ODYSSEUS_PORT=18796
ENV ODYSSEUS_CMD=python3
ENV ODYSSEUS_ARGS=/app/scripts/run_odysseus.py
ENV ODYSSEUS_BASE_PATH=/odysseus
ENV ODYSSEUS_APP_DIR=/app/odysseus
ENV ODYSSEUS_CONFIG_PATH=/app/odysseus.json
ENV ODYSSEUS_LOG_PATH=/tmp/odysseus.log
ENV ODYSSEUS_ERR_LOG_PATH=/tmp/odysseus.err.log

RUN mkdir -p /app/vault /app/.openclaw/state

EXPOSE 7860

# Note: This Space does not run llama.cpp directly.
# Use the following command in your dedicated LLM Space Dockerfile:
# CMD ["llama-server", "--host", "0.0.0.0", "--port", "8080", "--ctx-size", "8192", "--model", "/models/your-model.gguf"]

CMD ["supervisord", "-c", "/app/supervisord.conf"]