Compare commits
1 Commits
6b33c3099a
...
feat/7zz-c
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d2404d8f6 |
@@ -52,10 +52,6 @@ services:
|
|||||||
- ROCR_VISIBLE_DEVICES=0,1
|
- ROCR_VISIBLE_DEVICES=0,1
|
||||||
- HSA_ENABLE_SDMA=0
|
- HSA_ENABLE_SDMA=0
|
||||||
- TZ=America/Montreal
|
- TZ=America/Montreal
|
||||||
# Hermes Workspace dashboard (port 9119) — enables multi-agent web UI
|
|
||||||
- HERMES_DASHBOARD=1
|
|
||||||
- HERMES_DASHBOARD_HOST=0.0.0.0
|
|
||||||
- HERMES_DASHBOARD_PORT=9119
|
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/HoardingCow_docker_data/Hermes/data:/opt/data
|
- /mnt/HoardingCow_docker_data/Hermes/data:/opt/data
|
||||||
# Syncthing-shared org files — read-only view of user's agenda
|
# Syncthing-shared org files — read-only view of user's agenda
|
||||||
@@ -70,12 +66,6 @@ services:
|
|||||||
- "26"
|
- "26"
|
||||||
networks:
|
networks:
|
||||||
- ai_backend
|
- ai_backend
|
||||||
healthcheck:
|
|
||||||
test: ["CMD-SHELL", "curl -fsS http://localhost:8642/health && curl -fsS http://localhost:9119/api/status || exit 1"]
|
|
||||||
interval: 15s
|
|
||||||
timeout: 5s
|
|
||||||
retries: 5
|
|
||||||
start_period: 60s
|
|
||||||
|
|
||||||
syncthing:
|
syncthing:
|
||||||
image: syncthing/syncthing:latest
|
image: syncthing/syncthing:latest
|
||||||
@@ -139,46 +129,6 @@ services:
|
|||||||
- "303"
|
- "303"
|
||||||
- "26"
|
- "26"
|
||||||
|
|
||||||
# ── Hermes Workspace ──────────────────────────────────────────
|
|
||||||
# Web UI for Hermes Agent — chat, memory, skills, terminal,
|
|
||||||
# multi-agent swarm orchestration. Connects to the existing
|
|
||||||
# hermes gateway (port 8642) and dashboard (port 9119).
|
|
||||||
hermes-workspace:
|
|
||||||
image: ghcr.io/outsourc-e/hermes-workspace:latest
|
|
||||||
container_name: hermes-workspace
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
hermes:
|
|
||||||
condition: service_healthy
|
|
||||||
environment:
|
|
||||||
HERMES_API_URL: http://hermes:8642
|
|
||||||
HERMES_DASHBOARD_URL: http://hermes:9119
|
|
||||||
HERMES_API_TOKEN: ${API_SERVER_KEY}
|
|
||||||
HERMES_PASSWORD: ${HERMES_WORKSPACE_PASSWORD:?must be set}
|
|
||||||
COOKIE_SECURE: "1"
|
|
||||||
volumes:
|
|
||||||
# Share the same Hermes data — workspace reads config, sessions,
|
|
||||||
# skills, memory from the agent's persistent volume
|
|
||||||
- /mnt/HoardingCow_docker_data/Hermes/data:/home/workspace/.hermes
|
|
||||||
networks:
|
|
||||||
- ai_backend
|
|
||||||
- ai_net
|
|
||||||
labels:
|
|
||||||
- "traefik.enable=true"
|
|
||||||
- "traefik.docker.network=ai_net"
|
|
||||||
|
|
||||||
- "traefik.http.routers.workspace-http.rule=Host(`workspace.lazyworkhorse.net`)"
|
|
||||||
- "traefik.http.routers.workspace-http.entrypoints=web"
|
|
||||||
- "traefik.http.routers.workspace-http.middlewares=redirect-to-https"
|
|
||||||
|
|
||||||
- "traefik.http.routers.workspace-https.rule=Host(`workspace.lazyworkhorse.net`)"
|
|
||||||
- "traefik.http.routers.workspace-https.entrypoints=websecure"
|
|
||||||
- "traefik.http.routers.workspace-https.tls=true"
|
|
||||||
- "traefik.http.routers.workspace-https.tls.certresolver=njalla"
|
|
||||||
|
|
||||||
- "traefik.http.services.workspace.loadbalancer.server.port=3000"
|
|
||||||
# ─────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
ai_net:
|
ai_net:
|
||||||
external: true
|
external: true
|
||||||
|
|||||||
@@ -79,6 +79,39 @@ PYEOF
|
|||||||
COPY --chmod=0755 himalaya-ro.sh /usr/local/bin/himalaya-ro
|
COPY --chmod=0755 himalaya-ro.sh /usr/local/bin/himalaya-ro
|
||||||
|
|
||||||
|
|
||||||
|
# ---------- Install 7-Zip (7zz) for CHM extraction ----------
|
||||||
|
RUN /opt/hermes/.venv/bin/python3 /dev/stdin << 'PYEOF'
|
||||||
|
import urllib.request, tarfile, os, shutil, re, subprocess
|
||||||
|
|
||||||
|
# Scrape 7-zip.org for latest Linux x64 binary link
|
||||||
|
url = 'https://7-zip.org/download.html'
|
||||||
|
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
|
||||||
|
r = urllib.request.urlopen(req, timeout=15)
|
||||||
|
html = r.read().decode()
|
||||||
|
match = re.search(r'href="(a/7z[\d]+-linux-x64\.tar\.xz)"', html)
|
||||||
|
if not match:
|
||||||
|
raise RuntimeError('Could not find 7z Linux x64 download link on 7-zip.org')
|
||||||
|
dl_url = f'https://7-zip.org/{match.group(1)}'
|
||||||
|
|
||||||
|
# Follow Himalaya pattern: download, extract, install, verify
|
||||||
|
xz = '/tmp/7z.tar.xz'
|
||||||
|
urllib.request.urlretrieve(dl_url, xz)
|
||||||
|
os.makedirs('/tmp/7z', exist_ok=True)
|
||||||
|
with tarfile.open(xz, 'r:xz') as t:
|
||||||
|
t.extractall('/tmp/7z')
|
||||||
|
shutil.move('/tmp/7z/7zz', '/usr/local/bin/7zz')
|
||||||
|
os.chmod('/usr/local/bin/7zz', 0o755)
|
||||||
|
shutil.rmtree('/tmp/7z', ignore_errors=True)
|
||||||
|
os.remove(xz)
|
||||||
|
|
||||||
|
# Verify
|
||||||
|
result = subprocess.run(['/usr/local/bin/7zz'], capture_output=True, text=True)
|
||||||
|
assert result.returncode == 0, f'7zz verify failed: {result.stderr}'
|
||||||
|
version = result.stdout.split()[2] if result.stdout else 'unknown'
|
||||||
|
print(f'7-Zip {version} installed successfully')
|
||||||
|
PYEOF
|
||||||
|
|
||||||
|
|
||||||
# ---------- Runtime ----------
|
# ---------- Runtime ----------
|
||||||
USER hermes
|
USER hermes
|
||||||
ENV HERMES_HOME=/opt/data
|
ENV HERMES_HOME=/opt/data
|
||||||
|
|||||||
Reference in New Issue
Block a user