Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- Dockerfile +10 -0
- entrypoint.sh +6 -1
Dockerfile
CHANGED
|
@@ -41,6 +41,16 @@ RUN curl -fsSL https://hermes-agent.nousresearch.com/install.sh \
|
|
| 41 |
--non-interactive \
|
| 42 |
--skip-setup
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
# Preserve the build-time ~/.hermes (managed node, uv, bundled skills) as a seed
|
| 45 |
# the runtime entrypoint copies into the persistent volume on first boot.
|
| 46 |
RUN rm -rf /hermes-seed && mkdir -p /hermes-seed \
|
|
|
|
| 41 |
--non-interactive \
|
| 42 |
--skip-setup
|
| 43 |
|
| 44 |
+
# Pre-build the web dashboard UI so the runtime never needs npm (--skip-build).
|
| 45 |
+
# The installer keeps its managed Node under ~/.hermes/node/bin.
|
| 46 |
+
# Only runs if the package shipped a `web/` source dir (dev installs may skip it).
|
| 47 |
+
RUN if [ -d /usr/local/lib/hermes-agent/web ]; then \
|
| 48 |
+
export PATH="/root/.hermes/node/bin:$PATH"; \
|
| 49 |
+
cd /usr/local/lib/hermes-agent/web \
|
| 50 |
+
&& npm install --no-audit --no-fund \
|
| 51 |
+
&& npm run build; \
|
| 52 |
+
fi
|
| 53 |
+
|
| 54 |
# Preserve the build-time ~/.hermes (managed node, uv, bundled skills) as a seed
|
| 55 |
# the runtime entrypoint copies into the persistent volume on first boot.
|
| 56 |
RUN rm -rf /hermes-seed && mkdir -p /hermes-seed \
|
entrypoint.sh
CHANGED
|
@@ -89,4 +89,9 @@ fi
|
|
| 89 |
# --- 4. Start the Hermes web dashboard on the Hugging Face PORT ----------------
|
| 90 |
PORT="${PORT:-7860}"
|
| 91 |
echo "[boot] Hermes dashboard → http://0.0.0.0:${PORT}/" >&2
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
# --- 4. Start the Hermes web dashboard on the Hugging Face PORT ----------------
|
| 90 |
PORT="${PORT:-7860}"
|
| 91 |
echo "[boot] Hermes dashboard → http://0.0.0.0:${PORT}/" >&2
|
| 92 |
+
# Use prebuilt web UI if present (baked at Docker build); otherwise build at runtime.
|
| 93 |
+
DASH_FLAGS="--host 0.0.0.0 --port ${PORT}"
|
| 94 |
+
if [ -d /usr/local/lib/hermes-agent/hermes_cli/web_dist ]; then
|
| 95 |
+
DASH_FLAGS="${DASH_FLAGS} --skip-build"
|
| 96 |
+
fi
|
| 97 |
+
exec hermes dashboard ${DASH_FLAGS}
|