hermes - 💡(How to fix) Fix [Setup]: hermes docker image $PATH var does not match hermes user $PATH [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#12541Fetched 2026-04-20 12:18:29
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

Full Error Output

Code Example



---

┊ 💻 preparing terminal…
  ┊ 💻 $         whoami && echo $PATH  0.5s

╭─ ⚕ Hermes ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
    User: hermes
    PATH: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games</thought>
RAW_BUFFERClick to expand / collapse

What's Going Wrong?

<img width="749" height="57" alt="Image" src="https://github.com/user-attachments/assets/ec13c146-f2e3-4263-af22-714efe57b2d9" /> <img width="577" height="326" alt="Image" src="https://github.com/user-attachments/assets/8af63a33-441a-4797-9e39-6a5aa7b3138f" />

I use hermes docker image to build with manim support, for user root and hermes when using docker exec PATH is fine and working accessible ... but hermes agent is not finding these ...

Dockerfile FROM nousresearch/hermes-agent:latest

USER root

Install Manim system dependencies

RUN apt-get install -y --no-install-recommends
libcairo2-dev
libpango1.0-dev
freeglut3-dev

Install Manim system dependencies

RUN apt-get install -y --no-install-recommends
texlive
texlive-latex-extra
pkg-config
dvisvgm

Clean up lists

RUN rm -rf /var/lib/apt/lists/*

Update the PATH globally so it survives the 'gosu' transition

ENV VIRTUAL_ENV=/opt/hermes/.venv ENV PATH="$VIRTUAL_ENV/bin:$PATH"

Make 'pip' a global command that points to the venv's pip

RUN echo 'alias pip="uv pip"' >> /etc/bash.bashrc

Use 'uv' to install manim into the existing environment

RUN uv pip install --no-cache-dir manim

Set this so Manim doesn't try to write to restricted folders

ENV MANIM_MEDIA_DIR="/opt/data/workspace/manim_media"

USER hermes WORKDIR /opt/data ENTRYPOINT [ "/opt/hermes/docker/entrypoint.sh" ]

Steps Taken

  1. aded aias with user or without user

Installation Method

Install script (curl | bash)

Operating System

Ubuntu Docker

Python Version

No response

Hermes Version

No response

Debug Report

Full Error Output

┊ 💻 preparing terminal…
  ┊ 💻 $         whoami && echo $PATH  0.5s

╭─ ⚕ Hermes ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
    User: hermes
    PATH: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games</thought>

What I've Already Tried

No response

extent analysis

TL;DR

The issue is likely due to the PATH environment variable not being properly set for the hermes user, causing the hermes agent to not find the installed dependencies.

Guidance

  • The ENV PATH directive in the Dockerfile only sets the PATH for the root user, and the USER hermes directive switches to the hermes user, which may not inherit the updated PATH.
  • To verify, check the PATH environment variable for the hermes user by running echo $PATH after switching to the hermes user in the Docker container.
  • Consider adding an ENV PATH directive after the USER hermes directive to ensure the hermes user has the correct PATH.
  • Alternatively, try setting the PATH environment variable in the entrypoint script (/opt/hermes/docker/entrypoint.sh) to ensure it is set correctly for the hermes user.

Example

USER hermes
ENV PATH="$VIRTUAL_ENV/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"

Notes

The issue may be related to the fact that the ENV PATH directive is set before the USER hermes directive, which may cause the PATH to not be inherited by the hermes user.

Recommendation

Apply workaround: Add an ENV PATH directive after the USER hermes directive to ensure the hermes user has the correct PATH. This should allow the hermes agent to find the installed dependencies.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING