mirror of
https://github.com/domfelipe/hermes-agent-custom.git
synced 2026-08-07 05:56:45 +00:00
fix: keep Hermes home aligned in runtime image
This commit is contained in:
parent
697825c505
commit
30e31cd200
3 changed files with 25 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ RUN chmod +x /opt/hermes-custom/entrypoint.sh
|
||||||
|
|
||||||
# Garante que o Python encontre o módulo customizado
|
# Garante que o Python encontre o módulo customizado
|
||||||
ENV PYTHONPATH=/opt/hermes-custom:/opt/hermes
|
ENV PYTHONPATH=/opt/hermes-custom:/opt/hermes
|
||||||
|
ENV HERMES_HOME=/opt/data/.hermes
|
||||||
ENV HERMES_MODEL_PROVIDER=ollama-cloud
|
ENV HERMES_MODEL_PROVIDER=ollama-cloud
|
||||||
ENV HERMES_MODEL_DEFAULT=gemma4:31b-cloud
|
ENV HERMES_MODEL_DEFAULT=gemma4:31b-cloud
|
||||||
ENV HERMES_STT_PROVIDER=local
|
ENV HERMES_STT_PROVIDER=local
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ GATEWAY_ARGS="${HERMES_GATEWAY_ARGS:---replace}"
|
||||||
GATEWAY_API_SERVER_ENABLED="${HERMES_GATEWAY_API_SERVER_ENABLED:-false}"
|
GATEWAY_API_SERVER_ENABLED="${HERMES_GATEWAY_API_SERVER_ENABLED:-false}"
|
||||||
HERMES_ALLOW_ROOT_GATEWAY="${HERMES_ALLOW_ROOT_GATEWAY:-1}"
|
HERMES_ALLOW_ROOT_GATEWAY="${HERMES_ALLOW_ROOT_GATEWAY:-1}"
|
||||||
export HERMES_ALLOW_ROOT_GATEWAY
|
export HERMES_ALLOW_ROOT_GATEWAY
|
||||||
|
export HERMES_HOME CONFIG_PATH SOUL_PATH
|
||||||
|
|
||||||
mkdir -p "$HERMES_HOME"
|
mkdir -p "$HERMES_HOME"
|
||||||
|
|
||||||
|
|
|
||||||
23
tests/test_runtime_env.py
Normal file
23
tests/test_runtime_env.py
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
|
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
|
||||||
|
|
||||||
|
class RuntimeEnvTests(unittest.TestCase):
|
||||||
|
def test_image_sets_default_hermes_home(self) -> None:
|
||||||
|
dockerfile = (REPO_ROOT / "Dockerfile").read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
self.assertIn("ENV HERMES_HOME=/opt/data/.hermes", dockerfile)
|
||||||
|
|
||||||
|
def test_entrypoint_exports_hermes_home_to_child_processes(self) -> None:
|
||||||
|
entrypoint = (REPO_ROOT / "entrypoint.sh").read_text(encoding="utf-8")
|
||||||
|
|
||||||
|
self.assertIn("export HERMES_HOME CONFIG_PATH SOUL_PATH", entrypoint)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue