fix(docker): improve two-container agent path discovery and docs — v0.50.158 (PR #873 by @bergeouss, closes #858)

docker_init.bash now checks /opt/hermes as a fallback alongside the primary path. Warning updated with concrete mount guidance. Volume type notes added to compose files and README.
This commit is contained in:
bergeouss
2026-04-23 01:35:09 +02:00
committed by GitHub
parent 0a75b3f1d3
commit a72208eaf6
4 changed files with 49 additions and 4 deletions

View File

@@ -294,14 +294,29 @@ else
test -x /app/venv/bin/pip
echo ""; echo "== Adding hermes-agent's pyproject.toml base dependencies to the virtual environment"
if [ -d "/home/hermeswebui/.hermes/hermes-agent" ] && [ -f "/home/hermeswebui/.hermes/hermes-agent/pyproject.toml" ]; then
uv pip install "/home/hermeswebui/.hermes/hermes-agent[honcho]" --trusted-host pypi.org --trusted-host files.pythonhosted.org || error_exit "Failed to install hermes-agent's requirements"
_agent_paths=(
"/home/hermeswebui/.hermes/hermes-agent"
"/opt/hermes"
)
_agent_src=""
for _p in "${_agent_paths[@]}"; do
if [ -d "$_p" ] && [ -f "$_p/pyproject.toml" ]; then
_agent_src="$_p"
break
fi
done
if [ -n "$_agent_src" ]; then
uv pip install "$_agent_src[honcho]" --trusted-host pypi.org --trusted-host files.pythonhosted.org || error_exit "Failed to install hermes-agent's requirements"
else
echo ""
echo "!! WARNING: hermes-agent source not found at /home/hermeswebui/.hermes/hermes-agent"
echo "!! WARNING: hermes-agent source not found."
echo "!! Looked in: ${_agent_paths[0]}"
echo "!! ${_agent_paths[1]}"
echo "!! The WebUI will start with reduced functionality (no model auto-detection,"
echo "!! no personality routing, no CLI session imports)."
echo "!! To fix: mount the agent source volume into the container. See:"
echo "!! To fix: mount the agent source volume into the container:"
echo "!! -v /path/to/hermes-agent:/home/hermeswebui/.hermes/hermes-agent"
echo "!! Or see the two-container compose example:"
echo "!! https://github.com/nesquena/hermes-webui/blob/master/docker-compose.two-container.yml"
echo ""
fi