Skip to content

The agent that grows with you

fix(docker): copy hermes_constants.py beside pm for sealed-stage pm.cli install

ethernet5b5306c4268c
diff --git a/Dockerfile b/Dockerfile
index 141ae2bdf76..4db08f3b392 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -199,6 +199,11 @@ WORKDIR /opt/hermes
# and never hunted at boot.
ENV HERMES_RUNTIME_DIR=/opt/hermes/tools
COPY pm/ pm/
+# pm's lazy imports resolve get_default_hermes_root()/project_venv_dir()
+# from hermes_constants (stdlib-only) at install time — a sealed-stage
+# `python3 -m pm.cli install` fails with "No module named
+# 'hermes_constants'" without it on the path. Copy the module next to pm.
+COPY hermes_constants.py hermes_constants.py
RUN set -eu; \
python3 -m pm.cli install uv chromium chromium-headless-shell; \
ln -sf /opt/hermes/tools/uv-*/uv /usr/local/bin/uv; \