fix: Update compose submodule for Matrix bridge dependency fix #3

Closed
Hermes wants to merge 3 commits from fix/matrix-bridge-openai-dependency into master
Collaborator

Problem

Matrix bridge users encounter ModuleNotFoundError: No module named 'openai' when trying to communicate with Hermes.

Root Cause

The Hermes gateway runs from an isolated virtual environment (/opt/hermes/.venv), but the previous compose configuration:

  1. Installed dependencies to system Python instead of the venv
  2. Did not persist the venv, causing packages to be wiped on container restart

Changes

This PR updates the compose submodule reference to include the fix from gortium/compose#2:

Submodule Update

  • From: fb0f2cb (broken - deps installed to wrong location)
  • To: a404f5e (fixed - deps installed to venv with persistence)

What the Submodule Fix Does

1. Correct installation target:

# Before
command: "sh -c 'pip install openai matrix-nio[encryption] -q && hermes gateway run'"

# After  
command: "sh -c '/opt/hermes/.venv/bin/uv pip install openai matrix-nio[encryption] --system -q && /opt/hermes/.venv/bin/hermes gateway run'"

2. Persistent venv storage:

volumes:
  - /mnt/HoardingCow_docker_data/Hermes/venv:/opt/hermes/.venv  # NEW

Why This Approach

Decision Rationale
uv over pip Hermes uses astral-sh's uv (modern, faster package manager)
--system flag Required for installing into active venv from scripts
matrix-nio[encryption] Correct SDK for Hermes (asyncio-based, not mautrix); enables E2EE
Persistent mount Survives container restarts/rebuilds

Deployment

sudo nixos-rebuild switch --flake .#lazyworkhorse

The reloadTriggers mechanism in docker_manager.nix will detect the compose.yml hash change and recreate the container.

Verification

# Check packages are installed
docker exec hermes /opt/hermes/.venv/bin/python -c "import openai, nio; print('OK')"

# Test Matrix connectivity
# (Send a message via Matrix - should no longer get ModuleNotFoundError)
  • Issue: #4
  • Compose PR: gortium/compose#2
  • Fixes: ModuleNotFoundError preventing Matrix bridge connectivity
## Problem Matrix bridge users encounter `ModuleNotFoundError: No module named 'openai'` when trying to communicate with Hermes. ## Root Cause The Hermes gateway runs from an isolated virtual environment (`/opt/hermes/.venv`), but the previous compose configuration: 1. Installed dependencies to system Python instead of the venv 2. Did not persist the venv, causing packages to be wiped on container restart ## Changes This PR updates the `compose` submodule reference to include the fix from gortium/compose#2: ### Submodule Update - **From:** `fb0f2cb` (broken - deps installed to wrong location) - **To:** `a404f5e` (fixed - deps installed to venv with persistence) ### What the Submodule Fix Does **1. Correct installation target:** ```yaml # Before command: "sh -c 'pip install openai matrix-nio[encryption] -q && hermes gateway run'" # After command: "sh -c '/opt/hermes/.venv/bin/uv pip install openai matrix-nio[encryption] --system -q && /opt/hermes/.venv/bin/hermes gateway run'" ``` **2. Persistent venv storage:** ```yaml volumes: - /mnt/HoardingCow_docker_data/Hermes/venv:/opt/hermes/.venv # NEW ``` ## Why This Approach | Decision | Rationale | |----------|-----------| | `uv` over `pip` | Hermes uses astral-sh's `uv` (modern, faster package manager) | | `--system` flag | Required for installing into active venv from scripts | | `matrix-nio[encryption]` | Correct SDK for Hermes (asyncio-based, not mautrix); enables E2EE | | Persistent mount | Survives container restarts/rebuilds | ## Deployment ```bash sudo nixos-rebuild switch --flake .#lazyworkhorse ``` The `reloadTriggers` mechanism in `docker_manager.nix` will detect the compose.yml hash change and recreate the container. ## Verification ```bash # Check packages are installed docker exec hermes /opt/hermes/.venv/bin/python -c "import openai, nio; print('OK')" # Test Matrix connectivity # (Send a message via Matrix - should no longer get ModuleNotFoundError) ``` ## Related - Issue: https://code.lazyworkhorse.net/gortium/infra/issues/4 - Compose PR: https://code.lazyworkhorse.net/gortium/compose/pulls/2 - Fixes: ModuleNotFoundError preventing Matrix bridge connectivity
Hermes added 2 commits 2026-04-29 02:35:08 +00:00
Hermes changed title from fix: Update compose submodule for Matrix bridge dependencies to fix: Update compose submodule for Matrix bridge dependency fix 2026-04-29 02:58:44 +00:00
Hermes added 1 commit 2026-04-29 03:35:17 +00:00
gortium self-assigned this 2026-04-29 23:43:38 +00:00
Hermes closed this pull request 2026-04-29 23:50:41 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/infra#3
No description provided.