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
19 changes: 19 additions & 0 deletions .github/actions/resolve-hermes-base-image/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: resolve-hermes-base-image
description: Resolve the Hermes sandbox base image from GHCR, falling back to a local Dockerfile.base build.

runs:
using: composite
steps:
- name: Resolve Hermes sandbox base image
shell: bash
run: |
if docker pull ghcr.io/nvidia/nemoclaw/hermes-sandbox-base:latest 2>/dev/null; then
echo "HERMES_BASE_IMAGE=ghcr.io/nvidia/nemoclaw/hermes-sandbox-base:latest" >> "$GITHUB_ENV"
else
echo "::warning::GHCR Hermes base image not available, building locally"
docker build -f agents/hermes/Dockerfile.base -t nemoclaw-hermes-base-local .
echo "HERMES_BASE_IMAGE=nemoclaw-hermes-base-local" >> "$GITHUB_ENV"
fi
43 changes: 43 additions & 0 deletions .github/workflows/base-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
branches: [main]
paths:
- "Dockerfile.base"
- "agents/hermes/Dockerfile.base"
# Dockerfile.base validates min_openclaw_version from this file at build time.
- "nemoclaw-blueprint/blueprint.yaml"
workflow_dispatch:
Expand Down Expand Up @@ -87,3 +88,45 @@ jobs:
cache-to: type=gha,mode=max
build-args: |
${{ inputs.openclaw_version && format('OPENCLAW_VERSION={0}', inputs.openclaw_version) || '' }}

build-and-push-hermes:
if: github.repository == 'NVIDIA/NemoClaw'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up QEMU (arm64 emulation)
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/nvidia/nemoclaw/hermes-sandbox-base
tags: |
type=raw,value=latest
type=sha,prefix=,format=short

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: agents/hermes/Dockerfile.base
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
27 changes: 27 additions & 0 deletions .github/workflows/sandbox-images-and-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,33 @@ jobs:
path: /tmp/isolation-image.tar.gz
retention-days: 1

build-hermes-sandbox-image:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Resolve Hermes base image
uses: ./.github/actions/resolve-hermes-base-image

- name: Build Hermes production image
run: docker build -f agents/hermes/Dockerfile --build-arg BASE_IMAGE=${{ env.HERMES_BASE_IMAGE }} -t nemoclaw-hermes-production .

- name: Verify sandbox user can read copied files
run: |
set -euo pipefail
docker run --rm --user sandbox nemoclaw-hermes-production \
test -r /opt/nemoclaw-generate-config.ts
docker run --rm --user sandbox nemoclaw-hermes-production \
test -r /opt/nemoclaw-hermes-plugin/plugin.yaml
docker run --rm --user sandbox nemoclaw-hermes-production \
test -r /opt/nemoclaw-blueprint/blueprint.yaml
docker run --rm --user sandbox nemoclaw-hermes-production \
test -x /usr/local/bin/nemoclaw-decode-proxy
docker run --rm --user sandbox nemoclaw-hermes-production \
test -x /usr/local/bin/nemoclaw-start

build-sandbox-images-arm64:
if: inputs.run_arm64
runs-on: ubuntu-24.04-arm
Expand Down
2 changes: 2 additions & 0 deletions agents/hermes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ ENV HERMES_TELEGRAM_DISABLE_FALLBACK_IPS=1

# Copy NemoClaw plugin for Hermes (Python-based)
COPY agents/hermes/plugin/ /opt/nemoclaw-hermes-plugin/
RUN chmod -R a+rX /opt/nemoclaw-hermes-plugin/

# Copy config generation script and URL-decode proxy
COPY agents/hermes/generate-config.ts /opt/nemoclaw-generate-config.ts
RUN chmod 444 /opt/nemoclaw-generate-config.ts
COPY agents/hermes/decode-proxy.py /usr/local/bin/nemoclaw-decode-proxy
RUN chmod 755 /usr/local/bin/nemoclaw-decode-proxy

Expand Down
Loading