Compare commits
1 Commits
feat/7zz-c
...
feat/herme
| Author | SHA1 | Date | |
|---|---|---|---|
| d446d67995 |
@@ -52,6 +52,10 @@ 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
|
||||||
@@ -66,6 +70,12 @@ 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
|
||||||
|
|||||||
@@ -79,39 +79,6 @@ 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