molecule-ai

workspace-template-hermes (sha-981769e)

Published 2026-10-09 16:41:08 +00:00 by hongming

Installation

docker pull git.moleculesai.app/molecule-ai/workspace-template-hermes:sha-981769e
sha256:d1211e0da51d28b83fe374f1e68cf0f7768a4c29356049fe33f037bc846f69fc

About this package

Molecule AI workspace template — hermes runtime

Image Layers

# debian.sh --arch 'amd64' out/ 'trixie' '@1791158400'
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV LANG=C.UTF-8
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; apt-get dist-clean # buildkit
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION=3.11.17
ENV PYTHON_SHA256=bfb74ad39efae27cda510f134ab408e00f9992c56851cfc0b1cdb5646da11599
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev g++ gcc gnupg libbluetooth-dev libbz2-dev libc6-dev libdb-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; ldconfig; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -rt dpkg-query --search | awk 'sub(":$", "", $1) { print $1 }' | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; apt-get dist-clean; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==79.0.1' 'wheel==0.46.3' ; pip3 --version # buildkit
RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit
CMD ["python3"]
RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git gosu xz-utils build-essential sudo util-linux docker.io && rm -rf /var/lib/apt/lists/* # buildkit
RUN /bin/sh -c curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg -o /usr/share/keyrings/githubcli-archive-keyring.gpg && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && apt-get update && apt-get install -y --no-install-recommends gh && rm -rf /var/lib/apt/lists/* && gh --version # buildkit
RUN /bin/sh -c useradd -u 1000 -m -s /bin/bash agent # buildkit
RUN /bin/sh -c set -eux; printf 'agent ALL=(ALL) NOPASSWD:ALL\n' > /etc/sudoers.d/agent-t4; chmod 0440 /etc/sudoers.d/agent-t4; visudo -cf /etc/sudoers.d/agent-t4; groupadd -f docker; groupadd -g 988 -f docker-host || true; usermod -aG docker agent; usermod -aG docker-host agent || true; id agent # buildkit
ARG RUNTIME_VERSION=0.4.92
ARG MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/
WORKDIR /app
COPY requirements.txt . # buildkit
COPY scripts/prepare_runtime_requirements.py /usr/local/bin/prepare-runtime-requirements.py # buildkit
RUN |2 RUNTIME_VERSION=0.4.92 MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ /bin/sh -c set -eu; runtime_project="molecules-workspace-runtime"; runtime_requirement="$(python3 /usr/local/bin/prepare-runtime-requirements.py --requirements requirements.txt --output /tmp/template-requirements.txt --runtime-version "$RUNTIME_VERSION")"; case "$runtime_requirement" in "$runtime_project"*) ;; *) exit 1 ;; esac; rm -rf /tmp/molecule-runtime; mkdir /tmp/molecule-runtime; pip download --isolated --only-binary=:all: --no-deps --index-url "$MOLECULE_RUNTIME_INDEX" --dest /tmp/molecule-runtime "$runtime_requirement"; wheel_count="$(find /tmp/molecule-runtime -maxdepth 1 -type f -name '*.whl' | wc -l)"; test "$wheel_count" -eq 1; runtime_wheel="$(find /tmp/molecule-runtime -maxdepth 1 -type f -name 'molecules_workspace_runtime-*.whl')"; test -n "$runtime_wheel"; pip install --isolated --no-cache-dir "$runtime_wheel" -r /tmp/template-requirements.txt; rm -rf /tmp/molecule-runtime /tmp/template-requirements.txt # buildkit
COPY adapter.py . # buildkit
COPY __init__.py . # buildkit
COPY executor.py . # buildkit
COPY scripts/ /app/scripts/ # buildkit
COPY start.sh /usr/local/bin/start.sh # buildkit
COPY scripts/mcp-reconcile-watch.sh /usr/local/bin/mcp-reconcile-watch.sh # buildkit
RUN |2 RUNTIME_VERSION=0.4.92 MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ /bin/sh -c chmod +x /usr/local/bin/start.sh /usr/local/bin/mcp-reconcile-watch.sh # buildkit
COPY scripts/molecule-askpass /usr/local/bin/molecule-askpass # buildkit
RUN |2 RUNTIME_VERSION=0.4.92 MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ /bin/sh -c chmod +x /usr/local/bin/molecule-askpass # buildkit
ARG HERMES_COMMIT=f97608f178d1ffeca59860195ab7da295f7c8e5f
ARG HERMES_INSTALL_SH_SHA256=2017ddf0cc7bc6cfb70d40dc9fba1d916f47dbcccf5fe73bdee2cf93a11262af
COPY --chown=agent:agent vendor/hermes-agent/install.sh /tmp/hermes-install.sh # buildkit
USER agent
WORKDIR /home/agent
RUN |4 RUNTIME_VERSION=0.4.92 MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ HERMES_COMMIT=f97608f178d1ffeca59860195ab7da295f7c8e5f HERMES_INSTALL_SH_SHA256=2017ddf0cc7bc6cfb70d40dc9fba1d916f47dbcccf5fe73bdee2cf93a11262af /bin/sh -c set -eu; echo "${HERMES_INSTALL_SH_SHA256} /tmp/hermes-install.sh" | sha256sum -c -; bash /tmp/hermes-install.sh --skip-setup --commit "${HERMES_COMMIT}" --force-commit; rm -f /tmp/hermes-install.sh # buildkit
RUN |4 RUNTIME_VERSION=0.4.92 MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ HERMES_COMMIT=f97608f178d1ffeca59860195ab7da295f7c8e5f HERMES_INSTALL_SH_SHA256=2017ddf0cc7bc6cfb70d40dc9fba1d916f47dbcccf5fe73bdee2cf93a11262af /bin/sh -c set -eu; actual="$(git -C /home/agent/.hermes/hermes-agent rev-parse HEAD)"; if [ "$actual" != "${HERMES_COMMIT}" ]; then echo "FATAL: hermes checkout is at $actual, expected ${HERMES_COMMIT}." >&2; echo " install.sh ignored --commit; the image would ship unpinned upstream main." >&2; exit 1; fi; echo "hermes checkout pinned at $actual" # buildkit
ENV PATH=/home/agent/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ARG HERMES_PYPI_FLOOR=0.21.5
ARG HERMES_PLATFORM_MOLECULE_A2A_REF=93d43d772470eb3ddc781858dc5629f3464eed99
RUN |6 RUNTIME_VERSION=0.4.92 MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ HERMES_COMMIT=f97608f178d1ffeca59860195ab7da295f7c8e5f HERMES_INSTALL_SH_SHA256=2017ddf0cc7bc6cfb70d40dc9fba1d916f47dbcccf5fe73bdee2cf93a11262af HERMES_PYPI_FLOOR=0.21.5 HERMES_PLATFORM_MOLECULE_A2A_REF=93d43d772470eb3ddc781858dc5629f3464eed99 /bin/sh -c /home/agent/.hermes/hermes-agent/venv/bin/python3 -m ensurepip --upgrade && /home/agent/.hermes/hermes-agent/venv/bin/python3 -m pip install --no-cache-dir "git+https://git.moleculesai.app/molecule-ai/hermes-platform-molecule-a2a.git@${HERMES_PLATFORM_MOLECULE_A2A_REF}#egg=hermes-platform-molecule-a2a" # buildkit
RUN |6 RUNTIME_VERSION=0.4.92 MOLECULE_RUNTIME_INDEX=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ HERMES_COMMIT=f97608f178d1ffeca59860195ab7da295f7c8e5f HERMES_INSTALL_SH_SHA256=2017ddf0cc7bc6cfb70d40dc9fba1d916f47dbcccf5fe73bdee2cf93a11262af HERMES_PYPI_FLOOR=0.21.5 HERMES_PLATFORM_MOLECULE_A2A_REF=93d43d772470eb3ddc781858dc5629f3464eed99 /bin/sh -c MOLECULE_PREBAKE_NODE_BIN=/home/agent/.hermes/node/bin bash "$(python3 -c 'import molecule_runtime, os; print(os.path.dirname(molecule_runtime.__file__))')/scripts/prebake-mgmt-mcp.sh" # buildkit
USER root
WORKDIR /app
ENV ADAPTER_MODULE=adapter HERMES_API_BASE=http://127.0.0.1:8642/v1 API_SERVER_ENABLED=true API_SERVER_HOST=127.0.0.1 API_SERVER_PORT=8642 MOLECULE_A2A_PLATFORM_ENABLED=true MOLECULE_A2A_PLATFORM_HOST=127.0.0.1 MOLECULE_A2A_PLATFORM_PORT=8645 MOLECULE_A2A_CALLBACK_HOST=127.0.0.1 MOLECULE_A2A_CALLBACK_PORT=8646
ENTRYPOINT ["/usr/local/bin/start.sh"]

Labels

Key Value
org.opencontainers.image.description Molecule AI workspace template — hermes runtime
org.opencontainers.image.revision 981769e7070e299dbaceacc85cb8b1ea9de7a4a3
org.opencontainers.image.source https://git.moleculesai.app/molecule-ai/molecule-ai-workspace-template-hermes
Details
Container
2026-10-09 16:41:08 +00:00
5
OCI / Docker
linux/amd64
2.0 GiB
Versions (19) View all
latest 2026-10-13
sha-c2c55d4 2026-10-13
sha-f2031c8 2026-10-13
sha-c1c4652 2026-10-12
sha-981769e 2026-10-09