feat(settings): run local VocaGateway from Advanced (podman-first) - #774
Draft
jatinkrmalik wants to merge 12 commits into
Draft
feat(settings): run local VocaGateway from Advanced (podman-first)#774jatinkrmalik wants to merge 12 commits into
jatinkrmalik wants to merge 12 commits into
Conversation
Add an optional Local VocaGateway panel next to Remote Server so Linux users can start the pinned v0.1.0 compose project with podman (docker fallback), watch Live/Pairable/Ready status, pair a phone without loopback QR URLs, and preset remote_api to the gateway transcriptions endpoint. Stop preserves volumes; Flatpak fails closed; tray offers Stop only when this session manages the gateway. Default on-device engine stays whisper.cpp.
✅ Deploy Preview for voca-linux canceled.
|
VocaGateway v0.1.0 exposes default service gateway plus native/cuda/vulkan profiles, not cpu. Start and stop the default service without --profile, keep the latest image pin rejection, and prefer save_config for the remote_api preset.
v0.1.0 has no cpu profile entry, but Compose still starts the unprofiled gateway service when --profile cpu is set, and keeps cuda/vulkan/native off. That matches the frozen desktop embed contract and stays forward-compatible.
Keep podman/docker probing off the GTK thread, reject link-local and loopback public URLs for phone QR, sanitize compose .env image overrides, and cap bootstrap token reads so a hostile file cannot blow memory.
When Allow LAN flips while compose is already managed, rewrite publish host and PUBLIC_URL and recreate the gateway before Pairable comes back. Also reject default docker/podman bridge addresses for phone QR.
Cover 172.17.0.2 / link-local not becoming Pairable, and the mid-run LAN toggle path that must wait for compose republish before advertising a phone URL.
Align Pairable/QR host checks with vocagateway desktop-embed policy so 127.1 / localhost.* never become phone-reachable display URLs.
Gateway poll callbacks were left registered after Settings closed, so idle_add could touch destroyed GTK widgets while compose stayed up.
_bridge_iface_ips shells out to host ip; without host_env the AST gate fails and AppImage bundles can hand the wrong GLib to ip.
The explicit setuptools packages list omitted the new package, so the bundle booted from source trees but died with ModuleNotFoundError on every distro boot test.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Vocalinux can optionally start a local VocaGateway from Settings, next to Remote Server. This is for people who want phone pairing and a self-hosted transcription endpoint on the same Linux box. It is not on-device recognition: audio still goes to the gateway container.
The default engine stays whisper.cpp. Nothing here flips that.
What you get
Settings shows a Local VocaGateway card with Run/Stop, status (Stopped / Starting / Live / Pairable / Ready / Error), a LAN opt-in for Phone, pairing UI that refuses loopback QR URLs, and Use this Gateway to fill the existing remote_api fields (OpenAI path
/v1/audio/transcriptionsplus bearer token).Runtime detection prefers podman, then docker. If neither works, Run stays disabled with an install hint. Flatpak fails closed because the sandbox cannot see the host socket. The AppImage does not bundle a container engine.
Compose uses project name
vocagatewayand pins upstream tagv0.1.0. The v0.1.0 release has no published image assets, so the first start buildsvocagateway:v0.1.0from that tag. Stop runscompose downwithout wiping volumes. The tray only offers Stop local Gateway when this session started it. No login auto-start in v1.Safety notes
LAN publish defaults off (
127.0.0.1). Turning it on setsVOCAGATEWAY_PUBLISH_HOST=0.0.0.0and you still need a firewall rule on trusted networks only. Tokens live under~/.config/vocalinux/gateway_embed/mode 600 and are not logged. QR/SVG downloads are size-capped. GTK updates are marshalled with idle_add.Docs:
docs/GATEWAY_EMBED.md(also linked from HTTP_REMOTE and the README docs list).Test plan
pytest tests/test_gateway_embed.py(mocked; no real containers)