hermes_squid/stack-compose.yml — hermes-gateway now build: ./Dockerfile-hermes and is tagged into registry.rudolf.keenetic.link/hermes-agent for build cache. No other service is touched.
hermes_squid/squid.conf — expands the egress whitelist:
new stt_pkg_domains for pypi.org, files.pythonhosted.org, huggingface.co, github.com, models.dev, registry.npmjs.org, cdn-lfs.huggingface.co — needed for pip install faster-whisper (build) and HF model fetch (first run).
new telegram_ips covering AS62041 (91.108.4.0/22, 91.108.8.0/22, 91.108.12.0/22, 91.108.16.0/22, 91.108.20.0/22, 91.108.56.0/22, 149.154.160.0/20, 185.76.151.0/24). Backstops the dstdomain rule: squid's dstdomain does not match HTTPS CONNECT requests without ssl_bump, so the recent log shows 24 of 9083 api.telegram.org requests getting 403 in a 5-minute window.
renamed hermes_network -> localnet (squid default name, no behavior change).
Why local STT
config.yaml already pins stt.provider: local with faster-whisper. The package is missing from the runtime image, and the package indexes (pypi, huggingface) are denied by the current squid ACL. Adding faster-whisper to the image avoids the runtime install path entirely.
Deploy notes
brencher apply will trigger docker build of hermes-squid/Dockerfile-hermes (apt-get + pip install, ~3 min cold, cached after). The build fetches pypi/huggingface through the new squid rules.
On first start, hermes-gateway downloads the base faster-whisper model (~150 MB) from huggingface.co — also covered by stt_pkg_domains.
squid config is reread on docker service update; the new ACLs apply without a full stack restart.
Not touched (intentional)
poc/hermes/stack-compose.yml — uses a different image pin (latest), kept as-is. PR can be extended if the POC stack should also pick up faster-whisper.
comments in any file — none added.
related admin/ansible#11/13/16 (Beszel / Monit / connectivity) — separate concerns.
Verified
git diff clean, only the three files above.
branch feat/stt-voice-faster-whisper pushed to hermes/ansible.
PR target is admin/ansible:master (source of the fork).
Risks
apt-get update inside the new Dockerfile needs deb.debian.org reachable — already in allowed_domains, no change.
Build context is ./ (hermes_squid/). Dockerfile-hermes does not depend on anything else in that directory, but a future change adding COPY from the host must account for the new build context.
STT_LOCAL_MODEL=base is ~150 MB and runs on CPU. If latency on Raspberry-class nodes becomes an issue, switch to tiny (~75 MB, 2-3x faster, slightly lower quality).
Related
#19 — investigation that found the missing faster-whisper + squid deny pattern
#8 — general cleanup of admin/ansible; this PR is independent and smaller-scope
## What
Wires up local STT (faster-whisper) into the hermes-gateway container so voice messages on Telegram transcribe without depending on external services.
Closes #19.
## Changes
1. **`hermes_squid/Dockerfile-hermes`** (new) — extends `nousresearch/hermes-agent:v2026.8.3` with:
- `python3-pip`, `python3-venv`, `ffmpeg` (needed to decode Telegram .ogg voice)
- faster-whisper in a venv at `/opt/stt`
- env pins: `STT_PROVIDER=local`, `STT_LOCAL_MODEL=base`, `STT_LOCAL_DEVICE=cpu`, `STT_LOCAL_COMPUTE_TYPE=int8`
2. **`hermes_squid/stack-compose.yml`** — `hermes-gateway` now `build: ./Dockerfile-hermes` and is tagged into `registry.rudolf.keenetic.link/hermes-agent` for build cache. No other service is touched.
3. **`hermes_squid/squid.conf`** — expands the egress whitelist:
- new `stt_pkg_domains` for `pypi.org`, `files.pythonhosted.org`, `huggingface.co`, `github.com`, `models.dev`, `registry.npmjs.org`, `cdn-lfs.huggingface.co` — needed for `pip install faster-whisper` (build) and HF model fetch (first run).
- new `telegram_ips` covering AS62041 (91.108.4.0/22, 91.108.8.0/22, 91.108.12.0/22, 91.108.16.0/22, 91.108.20.0/22, 91.108.56.0/22, 149.154.160.0/20, 185.76.151.0/24). Backstops the `dstdomain` rule: squid's `dstdomain` does not match HTTPS CONNECT requests without `ssl_bump`, so the recent log shows 24 of 9083 `api.telegram.org` requests getting 403 in a 5-minute window.
- renamed `hermes_network` -> `localnet` (squid default name, no behavior change).
## Why local STT
`config.yaml` already pins `stt.provider: local` with `faster-whisper`. The package is missing from the runtime image, and the package indexes (pypi, huggingface) are denied by the current squid ACL. Adding faster-whisper to the image avoids the runtime install path entirely.
## Deploy notes
- brencher apply will trigger `docker build` of `hermes-squid/Dockerfile-hermes` (apt-get + pip install, ~3 min cold, cached after). The build fetches pypi/huggingface through the new squid rules.
- On first start, hermes-gateway downloads the `base` faster-whisper model (~150 MB) from huggingface.co — also covered by `stt_pkg_domains`.
- squid config is reread on `docker service update`; the new ACLs apply without a full stack restart.
## Not touched (intentional)
- `poc/hermes/stack-compose.yml` — uses a different image pin (`latest`), kept as-is. PR can be extended if the POC stack should also pick up faster-whisper.
- comments in any file — none added.
- related `admin/ansible#11/13/16` (Beszel / Monit / connectivity) — separate concerns.
## Verified
- `git diff` clean, only the three files above.
- branch `feat/stt-voice-faster-whisper` pushed to `hermes/ansible`.
- PR target is `admin/ansible:master` (source of the fork).
## Risks
- `apt-get update` inside the new Dockerfile needs `deb.debian.org` reachable — already in `allowed_domains`, no change.
- Build context is `./` (hermes_squid/). `Dockerfile-hermes` does not depend on anything else in that directory, but a future change adding `COPY` from the host must account for the new build context.
- `STT_LOCAL_MODEL=base` is ~150 MB and runs on CPU. If latency on Raspberry-class nodes becomes an issue, switch to `tiny` (~75 MB, 2-3x faster, slightly lower quality).
## Related
- #19 — investigation that found the missing faster-whisper + squid deny pattern
- #8 — general cleanup of admin/ansible; this PR is independent and smaller-scope
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Wires up local STT (faster-whisper) into the hermes-gateway container so voice messages on Telegram transcribe without depending on external services.
Closes #19.
Changes
hermes_squid/Dockerfile-hermes(new) — extendsnousresearch/hermes-agent:v2026.8.3with:python3-pip,python3-venv,ffmpeg(needed to decode Telegram .ogg voice)/opt/sttSTT_PROVIDER=local,STT_LOCAL_MODEL=base,STT_LOCAL_DEVICE=cpu,STT_LOCAL_COMPUTE_TYPE=int8hermes_squid/stack-compose.yml—hermes-gatewaynowbuild: ./Dockerfile-hermesand is tagged intoregistry.rudolf.keenetic.link/hermes-agentfor build cache. No other service is touched.hermes_squid/squid.conf— expands the egress whitelist:stt_pkg_domainsforpypi.org,files.pythonhosted.org,huggingface.co,github.com,models.dev,registry.npmjs.org,cdn-lfs.huggingface.co— needed forpip install faster-whisper(build) and HF model fetch (first run).telegram_ipscovering AS62041 (91.108.4.0/22, 91.108.8.0/22, 91.108.12.0/22, 91.108.16.0/22, 91.108.20.0/22, 91.108.56.0/22, 149.154.160.0/20, 185.76.151.0/24). Backstops thedstdomainrule: squid'sdstdomaindoes not match HTTPS CONNECT requests withoutssl_bump, so the recent log shows 24 of 9083api.telegram.orgrequests getting 403 in a 5-minute window.hermes_network->localnet(squid default name, no behavior change).Why local STT
config.yamlalready pinsstt.provider: localwithfaster-whisper. The package is missing from the runtime image, and the package indexes (pypi, huggingface) are denied by the current squid ACL. Adding faster-whisper to the image avoids the runtime install path entirely.Deploy notes
docker buildofhermes-squid/Dockerfile-hermes(apt-get + pip install, ~3 min cold, cached after). The build fetches pypi/huggingface through the new squid rules.basefaster-whisper model (~150 MB) from huggingface.co — also covered bystt_pkg_domains.docker service update; the new ACLs apply without a full stack restart.Not touched (intentional)
poc/hermes/stack-compose.yml— uses a different image pin (latest), kept as-is. PR can be extended if the POC stack should also pick up faster-whisper.admin/ansible#11/13/16(Beszel / Monit / connectivity) — separate concerns.Verified
git diffclean, only the three files above.feat/stt-voice-faster-whisperpushed tohermes/ansible.admin/ansible:master(source of the fork).Risks
apt-get updateinside the new Dockerfile needsdeb.debian.orgreachable — already inallowed_domains, no change../(hermes_squid/).Dockerfile-hermesdoes not depend on anything else in that directory, but a future change addingCOPYfrom the host must account for the new build context.STT_LOCAL_MODEL=baseis ~150 MB and runs on CPU. If latency on Raspberry-class nodes becomes an issue, switch totiny(~75 MB, 2-3x faster, slightly lower quality).Related
df2939fda8to4cb8eeae35Pull request closed