From fa2e72ae9c61a231445f28114b4f63f957e59dd1 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Mon, 9 Mar 2026 15:29:34 -0700 Subject: [PATCH] docs: document docker_volumes config for shared host directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Docker backend already supports user-configured volume mounts via docker_volumes, but it was undocumented — missing from DEFAULT_CONFIG, cli.py defaults, and configuration docs. Changes: - hermes_cli/config.py: Add docker_volumes to DEFAULT_CONFIG with inline documentation and examples - cli.py: Add docker_volumes to load_cli_config defaults - configuration.md: Full Docker Volume Mounts section with YAML examples, use cases (providing files, receiving outputs, shared workspaces), and env var alternative --- cli.py | 1 + hermes_cli/config.py | 4 +++ website/docs/user-guide/configuration.md | 32 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/cli.py b/cli.py index 61cb8d966..c82e85dc8 100755 --- a/cli.py +++ b/cli.py @@ -158,6 +158,7 @@ def load_cli_config() -> Dict[str, Any]: "singularity_image": "docker://python:3.11", "modal_image": "python:3.11", "daytona_image": "nikolaik/python-nodejs:python3.11-nodejs20", + "docker_volumes": [], # host:container volume mounts for Docker backend }, "browser": { "inactivity_timeout": 120, # Auto-cleanup inactive browser sessions after 2 min diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 7b689d764..018ac6557 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -77,6 +77,10 @@ DEFAULT_CONFIG = { "container_memory": 5120, # MB (default 5GB) "container_disk": 51200, # MB (default 50GB) "container_persistent": True, # Persist filesystem across sessions + # Docker volume mounts — share host directories with the container. + # Each entry is "host_path:container_path" (standard Docker -v syntax). + # Example: ["/home/user/projects:/workspace/projects", "/data:/data"] + "docker_volumes": [], }, "browser": { diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md index b600a4761..5e6f9088f 100644 --- a/website/docs/user-guide/configuration.md +++ b/website/docs/user-guide/configuration.md @@ -393,8 +393,40 @@ terminal: backend: local # or: docker, ssh, singularity, modal, daytona cwd: "." # Working directory ("." = current dir) timeout: 180 # Command timeout in seconds + + # Docker-specific settings + docker_image: "nikolaik/python-nodejs:python3.11-nodejs20" + docker_volumes: # Share host directories with the container + - "/home/user/projects:/workspace/projects" + - "/home/user/data:/data:ro" # :ro for read-only + + # Container resource limits (docker, singularity, modal, daytona) + container_cpu: 1 # CPU cores + container_memory: 5120 # MB (default 5GB) + container_disk: 51200 # MB (default 50GB) + container_persistent: true # Persist filesystem across sessions ``` +### Docker Volume Mounts + +When using the Docker backend, `docker_volumes` lets you share host directories with the container. Each entry uses standard Docker `-v` syntax: `host_path:container_path[:options]`. + +```yaml +terminal: + backend: docker + docker_volumes: + - "/home/user/projects:/workspace/projects" # Read-write (default) + - "/home/user/datasets:/data:ro" # Read-only + - "/home/user/outputs:/outputs" # Agent writes, you read +``` + +This is useful for: +- **Providing files** to the agent (datasets, configs, reference code) +- **Receiving files** from the agent (generated code, reports, exports) +- **Shared workspaces** where both you and the agent access the same files + +Can also be set via environment variable: `TERMINAL_DOCKER_VOLUMES='["/host:/container"]'` (JSON array). + See [Code Execution](features/code-execution.md) and the [Terminal section of the README](features/tools.md) for details on each backend. ## Memory Configuration