mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-03 07:21:54 +00:00
Add container detection utility to hermes_constants
Extract `is_container()` detection logic from scattered locations (`config.py`, `voice_mode.py`) into a centralized, cached function in `hermes_constants.py`. This follows the same pattern as `is_wsl()` and `is_termux()` — checking `/.dockerenv`, `/run/.containerenv`, and cgroup markers. Update gateway status detection (`status.py`, `dump.py`) to use the new utility and handle Docker/Podman differently from systemd-based systems. Update setup guidance (`setup.py`) to show Docker restart instructions when running in a container. Add Dockerfile.test for CI integration testing and spec.md as a Python module taste guide for contributors.
This commit is contained in:
parent
e89b9d9732
commit
2f2eeffb96
13 changed files with 785 additions and 68 deletions
|
|
@ -106,8 +106,9 @@ def detect_audio_environment() -> dict:
|
|||
if any(os.environ.get(v) for v in ('SSH_CLIENT', 'SSH_TTY', 'SSH_CONNECTION')):
|
||||
warnings.append("Running over SSH -- no audio devices available")
|
||||
|
||||
# Docker detection
|
||||
if os.path.exists('/.dockerenv'):
|
||||
# Docker/Podman container detection
|
||||
from hermes_constants import is_container
|
||||
if is_container():
|
||||
warnings.append("Running inside Docker container -- no audio devices")
|
||||
|
||||
# WSL detection — PulseAudio bridge makes audio work in WSL.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue