feat: update Hermes Dockerfile to build from forked source (gortium/hermes-agent) #20

Merged
gortium merged 1 commits from feat/hermes-fork-dockerfile into master 2026-05-11 02:07:42 +00:00
Collaborator

Summary

Update the AI stack to build the Hermes Docker image from our forked repo on Gitea instead of the official nousresearch/hermes-agent:latest base.

Changes

ai/compose.yml

  • Changed build: ./hermes to explicit build config with SSH agent forwarding

ai/hermes/Dockerfile

  • Clones from git@code.lazyworkhorse.net:gortium/hermes-agent.git at build time
  • Sets CHROME_EXECUTABLE env var so browser tool finds Playwright's Chromium
  • Removed patch_tts_tool.py step (Piper TTS default is now in fork source)
  • Keeps Piper TTS install + voice download

versioncontrol/compose.yml

  • Added GITEA__actions__ENABLED=true and DEFAULT_ACTIONS_URL=off for CI

Verification

cd /home/gortium/infra/assets/compose/ai
ssh-add ~/.ssh/id_ed25519
docker compose build hermes

Dependencies

  • Merge this PR first
  • Downstream: infra PR #35 (submodule pointer update)
## Summary Update the AI stack to build the Hermes Docker image from our forked repo on Gitea instead of the official `nousresearch/hermes-agent:latest` base. ## Changes ### ai/compose.yml - Changed `build: ./hermes` to explicit build config with SSH agent forwarding ### ai/hermes/Dockerfile - Clones from `git@code.lazyworkhorse.net:gortium/hermes-agent.git` at build time - Sets `CHROME_EXECUTABLE` env var so browser tool finds Playwright's Chromium - Removed `patch_tts_tool.py` step (Piper TTS default is now in fork source) - Keeps Piper TTS install + voice download ### versioncontrol/compose.yml - Added `GITEA__actions__ENABLED=true` and `DEFAULT_ACTIONS_URL=off` for CI ## Verification ```bash cd /home/gortium/infra/assets/compose/ai ssh-add ~/.ssh/id_ed25519 docker compose build hermes ``` ## Dependencies - **Merge this PR first** - Downstream: [infra PR #35](https://code.lazyworkhorse.net/gortium/infra/pulls/35) (submodule pointer update)
Hermes added 22 commits 2026-05-10 21:55:44 +00:00
- Add ollama/Dockerfile that builds ollama from source with AMDGPU_TARGETS=gfx906
- Uses ROCm 6.1 (rocm/dev-ubuntu-22.04:6.1.2-complete) for MI50 support
- Builds llama.cpp runner with HIPBLAS for gfx906 architecture
- Updates compose.yml to build from this Dockerfile instead of pulling ollama/ollama:latest
- ai/Dockerfile -> ai/hermes/Dockerfile
- ai/fix-permissions.sh -> ai/hermes/fix-permissions.sh
- ai/patch_tts_tool.py -> ai/hermes/patch_tts_tool.py
- ai/compose.yml: update hermes build context to ./hermes
- ollama stays at ai/ollama/Dockerfile
- Update OLLAMA_VERSION from v0.13.5 to v0.23.2
- Fix package: golang -> golang-go
- Add ENV HCC_AMDGPU_TARGET=gfx906 and HSA_ENABLE_SDMA=0
- Set proper ENTRYPOINT + CMD
The old Dockerfile used the deprecated llama.cpp/ subdirectory approach
which doesn't exist in ollama v0.23.2. Now using the official CMake
presets (ROCm 6 preset) with AMDGPU_TARGETS including gfx906:xnack-.
CMake 3.31 refuses CMAKE_HIP_COMPILER=hipcc with 'not supported'.
Using CXX=hipcc triggers the legacy HIP detection path which works.
Setting CXX=hipcc caused compilation failures on CPU backends (AVX
intrinsics). Now using GCC for CPU, ROCm's amdclang++ for HIP only.
ROCm 6.1's AMD clang 17 doesn't support gfx1200 (RDNA4).
Use only targets supported by ROCm 6.1: gfx906, gfx908, gfx90a, gfx1030, gfx1100.
Targets were corrupted during previous patch iterations, contained
gfx908/gfx90a from the CMake preset instead of gfx940/gfx1010/gfx1200.
ROCm 6.1 image doesn't have clang/clang++ in PATH (only amdclang++).
GCC is the default and works fine for CGo linking.
CPU backends compiled with GCC (fixes AVX intrinsic errors from hipcc).
HIP backend compiled with hipcc (legacy mode skips enable_language(HIP)).
Go binary built with GCC for CGo linking.
This avoids both CMAKE_HIP_COMPILER rejection and CXX=hipcc CPU failures.
ROCm 6.1's AMD clang 17 doesn't recognize gfx1200 architecture
(introduced in ROCm 6.2+). Caused compilation failure on all .cu files.
gfx940/gfx1010/gfx1030/gfx1100 cause C++ narrowing errors in ollama's
mma.cuh with hipcc. Since we only have MI50 (gfx906) cards, compile
for gfx906 only. Reduces build time and avoids upstream code bugs.
ENV PATH for ROCm overwrote the previous PATH that included Go.
Without Go in PATH, 'go build' fails with 'go: not found'.
- Use --preset 'ROCm 6' for HIP build step (enables enable_language(HIP))
- Remove /opt/rocm from PATH for CPU build to prevent check_language(HIP)
- Add CMAKE_PREFIX_PATH=/opt/rocm so find_package(hip) finds hip-config.cmake
- cmake --install --component HIP now works correctly with OLLAMA_RUNNER_DIR=rocm
- Switch Dockerfile to clone from gortium/hermes-agent (Gitea fork)
- Add SSH agent forwarding for private repo clone at build time
- Set CHROME_EXECUTABLE for Playwright Chromium
- Remove patch_tts_tool.py (Piper patch now in fork source)
- Enable Gitea Actions in versioncontrol compose
gortium merged commit 61a59dfac1 into master 2026-05-11 02:07:42 +00:00
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/compose#20
No description provided.