Skip to content

Split GPU bits into compose.gpu.yml override (#10)#80

Merged
BrettKinny merged 1 commit into
mainfrom
claude/address-open-issues-xvDUe
May 18, 2026
Merged

Split GPU bits into compose.gpu.yml override (#10)#80
BrettKinny merged 1 commit into
mainfrom
claude/address-open-issues-xvDUe

Conversation

@BrettKinny
Copy link
Copy Markdown
Owner

make setup was failing on hosts without the NVIDIA Container Toolkit
because docker-compose.yml hard-coded runtime: nvidia plus a GPU
reservation block. Daemon rejected the file with "unknown or invalid
runtime name: nvidia" before any container could start.

Moves the GPU bits (runtime: nvidia, deploy.resources.reservations,
NVIDIA_* env vars) into a new optional compose.gpu.yml override so
the base compose is CPU-portable. The wizard auto-detects the nvidia
runtime via docker info and either:

  • GPU host: writes COMPOSE_FILE=docker-compose.yml:compose.gpu.yml
    into .env so all docker compose invocations pick up the override.
  • CPU host: flips selected_module.ASR from WhisperLocal to
    FunASR (the CPU-friendly alternative already configured in
    .config.yaml) and removes any stale override line.

Adds a make doctor check that flags WhisperLocal+device: cuda
configured against a host with no nvidia runtime, and documents the
override in .env.example.

Copilot AI review requested due to automatic review settings May 18, 2026 08:00
The remaining piece of #15 (the in-repo half — bridge code hardening
already shipped in aa2d8ba) was that fresh deployments of
zeroclaw-bridge had no obvious place to put OPENROUTER_API_KEY /
VISION_API_KEY / VLM_API_KEY, so they'd silently start with an empty
key and the bridge's ERROR fallback would fire on every photo intent.

- `zeroclaw-bridge.service.template`: add
  `EnvironmentFile=-/root/zeroclaw-bridge/.env`. The leading `-` keeps
  systemd from failing startup if the file is absent — the bridge will
  surface the missing-key ERROR loudly on the first photo call instead.
- `scripts/install-bridge.sh`: same `EnvironmentFile=-${BRIDGE_DIR}/.env`
  in the inline unit, plus creation of a mode-0600 stub `.env` with
  `OPENROUTER_API_KEY=` (commented `VISION_API_KEY` / `VLM_API_KEY` for
  the split-key case). Existing `.env` is preserved.

This doesn't retroactively fix the production RPi mentioned in the
issue body — that one needs `systemctl edit zeroclaw-bridge` or a manual
`.env` drop — but it ensures every new install lands with the env file
present and the location obvious. Becomes moot when #36 retires the RPi.
@BrettKinny BrettKinny force-pushed the claude/address-open-issues-xvDUe branch from 85d08ea to 8d258e9 Compare May 18, 2026 08:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the Docker stack CPU-portable by moving NVIDIA-specific Compose configuration into an optional GPU override, while also introducing an idempotent setup wizard and bridge .env loading for API keys.

Changes:

  • Adds compose.gpu.yml and updates Compose templates/docs to make GPU support opt-in.
  • Replaces inline Makefile setup logic with scripts/setup-wizard.sh.
  • Adds bridge .env loading/stub creation and changelog/gitignore updates for generated config files.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
zeroclaw-bridge.service.template Loads optional bridge runtime environment file.
scripts/setup-wizard.sh New setup/regeneration wizard with GPU detection and template rendering.
scripts/install-bridge.sh Adds bridge .env systemd loading and stub creation.
Makefile Delegates setup to the wizard and adds GPU/ASR doctor check.
docker-compose.yml.template Removes hard-coded GPU settings and uses timezone placeholder.
compose.gpu.yml Adds optional NVIDIA runtime/device override.
CHANGELOG.md Documents setup, GPU split, and bridge env changes.
.gitignore Ignores generated config/runtime artifacts.
.env.example Documents optional COMPOSE_FILE GPU override.
.config.yaml.template Adds timezone/ASR/persona placeholders.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BrettKinny BrettKinny merged commit 89814e1 into main May 18, 2026
9 checks passed
@BrettKinny BrettKinny deleted the claude/address-open-issues-xvDUe branch May 18, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants