Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docker_hermes/demo/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TZ=Asia/Shanghai

# Image to run. Build with REGISTRY_DST=quay.io via tool.sh before starting Compose.
# Default local output: quay.io/labnow/hermes:local (no automatic push).
HERMES_IMAGE=quay.io/labnow/hermes:local
HERMES_IMAGE=quay.io/labnow/hermes

# Host-side persistent data directory.
HERMES_DATA_DIR=../../.data/hermes
Expand All @@ -17,7 +17,6 @@ HERMES_DASHBOARD=true
HERMES_DASHBOARD_HOST=0.0.0.0
HERMES_DASHBOARD_PUBLISH_HOST=127.0.0.1
HERMES_DASHBOARD_PORT=9119
HERMES_DASHBOARD_INSECURE=false

# Dashboard basic auth for local development.
# Default local password: hermes-local
Expand Down
23 changes: 9 additions & 14 deletions docker_hermes/demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
name: "svc-hermes"
name: "${PROFILE_ENV:-X}-svc-hermes"

services:
hermes:
container_name: ${HERMES_CONTAINER_NAME:-svc-hermes}
hostname: svc-hermes
image: "${HERMES_IMAGE:-quay.io/labnow/hermes:latest}"
pull_policy: if_not_present
pull_policy: always
restart: unless-stopped
# Keep standalone Compose behavior explicit even if the image CMD changes.
command: ["start-hermes.sh", "all"]
env_file: [".env.example"]
environment:
TZ: ${TZ:-Asia/Shanghai}
HERMES_HOME: /root/.hermes
HERMES_DASHBOARD: ${HERMES_DASHBOARD:-true}
HERMES_DASHBOARD_HOST: ${HERMES_DASHBOARD_HOST:-0.0.0.0}
HERMES_DASHBOARD_PORT: ${HERMES_DASHBOARD_PORT:-9119}
HERMES_DASHBOARD_INSECURE: ${HERMES_DASHBOARD_INSECURE:-false}
HERMES_DASHBOARD_BASIC_AUTH_USERNAME: ${HERMES_DASHBOARD_BASIC_AUTH_USERNAME:-}
HERMES_DASHBOARD_BASIC_AUTH_USERNAME: ${HERMES_DASHBOARD_BASIC_AUTH_USERNAME:-hermes}
HERMES_DASHBOARD_BASIC_AUTH_PASSWORD: ${HERMES_DASHBOARD_BASIC_AUTH_PASSWORD:-hermes}
HERMES_DASHBOARD_BASIC_AUTH_PASSWORD_HASH: ${HERMES_DASHBOARD_BASIC_AUTH_PASSWORD_HASH:-}
HERMES_DASHBOARD_BASIC_AUTH_PASSWORD: ${HERMES_DASHBOARD_BASIC_AUTH_PASSWORD:-}
HERMES_DASHBOARD_BASIC_AUTH_SECRET: ${HERMES_DASHBOARD_BASIC_AUTH_SECRET:-}
HERMES_DASHBOARD_BASIC_AUTH_TTL_SECONDS: ${HERMES_DASHBOARD_BASIC_AUTH_TTL_SECONDS:-}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
Expand All @@ -29,16 +27,13 @@ services:
DEEPSEEK_API_KEY: ${DEEPSEEK_API_KEY:-}
ports:
- "${HERMES_DASHBOARD_PUBLISH_HOST:-127.0.0.1}:${HERMES_DASHBOARD_PORT:-9119}:${HERMES_DASHBOARD_PORT:-9119}"
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck-hermes.sh"]
interval: 10s
timeout: 5s
start_period: 20s
retries: 3
volumes:
- ${HERMES_DATA_DIR:-../../.data/hermes}:/root/.hermes
- ${HERMES_DATA_DIR:-/data/storage/workspace/hermes}:/root/.hermes
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Keep standalone Compose behavior explicit even if the image CMD changes.
# command: ["tail", "-f", "/dev/null"]
command: ["start-hermes.sh", "all"]
21 changes: 10 additions & 11 deletions docker_hermes/hermes.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ RUN set -eux \
&& . /opt/utils/script-utils.sh && install_apt /opt/utils/install_list_hermes.apt \
## Clone source (full clone for reproducibility; depth 1 for speed)
&& git clone --depth 1 --branch main https://github.com/nousresearch/hermes-agent.git . \
&& chmod +x /opt/utils/*.sh && mv /opt/utils/*hermes*.sh /opt/utils/install_list_hermes.apt /opt/hermes/ \
&& chmod +x /opt/utils/*.sh && mv /opt/utils/*hermes*.sh /opt/utils/install_list_hermes.apt /opt/utils/supervisord.conf /opt/hermes/ \
## ---------- hack python-olm for building compatible wheels ----------
&& mkdir -pv /opt/hermes/vendor \
&& mkdir -pv /tmp/olm && cd /tmp/olm \
&& curl -s https://pypi.org/pypi/python-olm/3.2.16/json \
| jq -r '.urls[] | select(.packagetype=="sdist").url' \
| xargs curl -L -o python-olm-3.2.16.tar.gz \
&& tar xf python-olm-3.2.16.tar.gz \
&& cd python-olm-3.2.16 \
&& tar xf python-olm-3.2.16.tar.gz && cd python-olm-3.2.16 \
&& sed -i 's/cmake_minimum_required(VERSION [0-9.]*)/cmake_minimum_required(VERSION 3.5)/' libolm/CMakeLists.txt \
&& pip wheel . --no-build-isolation -w /tmp/olm/wheels \
&& mv /tmp/olm/wheels/*olm*.whl /opt/hermes/vendor/ \
Expand Down Expand Up @@ -65,23 +64,23 @@ LABEL maintainer="postmaster@labnow.ai"

# Production environment
ENV NODE_ENV=production
ENV HERMES_HOME=/root/.hermes
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/hermes/.playwright
ENV PYTHONPATH="/opt/hermes:${PYTHONPATH:-}"
ENV PATH="/opt/hermes/bin:/opt/node/bin:/opt/conda/bin:/root/.local/bin:${PATH}"
ENV HOME=/root/.hermes
ENV HERMES_HOME=/root/.hermes
ENV HERMES_ALLOW_ROOT_GATEWAY=1
# Copy the full hermes install tree from the builder (source + browsers + built frontends)
COPY --from=builder /opt/hermes /opt/hermes

# Discover the real python site-packages so legacy env-var fallbacks point at the right tree.
# Keep explicit versioned fallbacks around in case detection runs before the first pip install.
RUN set -eux && cd /opt/hermes \
&& . /opt/utils/script-utils.sh && install_apt /opt/hermes/install_list_hermes.apt \
&& uv pip install ./vendor/*.whl \
&& uv pip install ./vendor/*.whl && rm -rf ./vendor \
&& uv pip install -e ".[all,messaging,anthropic,bedrock,azure-identity,hindsight,matrix]" \
&& ln -sf /opt/hermes/*hermes*.sh /usr/local/bin/ \
&& ln -sf /opt/hermes/bin/*hermes*.sh /usr/local/bin/ \
&& rm -rf /opt/hermes/bin \
&& ln -sf /opt/hermes/start-hermes.sh /opt/conda/bin/hermes /usr/local/bin/ \
&& . /opt/utils/script-setup-sys.sh && setup_supervisord \
&& mkdir -pv /etc/supervisord/ && mv /opt/hermes/supervisord.conf /etc/supervisord/supervisord.conf \
&& install__clean

# Data persistence is owned by the runtime orchestrator.
Expand All @@ -92,5 +91,5 @@ RUN set -eux && cd /opt/hermes \
WORKDIR /root/.hermes
CMD ["start-hermes.sh", "all"]
EXPOSE 9119
HEALTHCHECK --interval=10s --timeout=5s --start-period=40s --retries=5 \
CMD ["/usr/local/bin/healthcheck-hermes.sh"]
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s --retries=5 \
CMD ["/usr/local/bin/start-hermes.sh", "healthcheck"]
24 changes: 0 additions & 24 deletions docker_hermes/work/healthcheck-hermes.sh

This file was deleted.

55 changes: 0 additions & 55 deletions docker_hermes/work/start-hermes-supervisord.sh

This file was deleted.

Loading
Loading