Compare commits

..

1 Commits

Author SHA1 Message Date
Thierry Pouplier
b5030df475 feat(hermes): add chromium for local browser tool
- Create custom Dockerfile extending nousresearch/hermes-agent with chromium installed
- Update compose.yml to build from local Dockerfile instead of pulling image
- Enables browser tool to work without Browserbase cloud service
2026-04-30 00:10:41 +00:00
3 changed files with 13 additions and 49 deletions

View File

@@ -1,48 +0,0 @@
FROM ghcr.io/astral-sh/uv:0.11.6-python3.13-trixie@sha256:b3c543b6c4f23a5f2df22866bd7857e5d304b67a564f4feab6ac22044dde719b AS uv_source
FROM tianon/gosu:1.19-trixie@sha256:3b176695959c71e123eb390d427efc665eeb561b1540e82679c15e992006b8b9 AS gosu_source
FROM debian:13.4
ENV PYTHONUNBUFFERED=1
ENV PLAYWRIGHT_BROWSERS_PATH=/opt/hermes/.playwright
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential nodejs npm python3 ripgrep ffmpeg gcc python3-dev libffi-dev procps git openssh-client docker-cli tini \
curl poppler-utils imagemagick \
chromium xvfb fonts-noto-color-emoji fonts-unifont fonts-liberation fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf fonts-freefont-ttf \
libasound2t64 libatk-bridge2.0-0t64 libatk1.0-0t64 libatspi2.0-0t64 libcairo2 libcups2t64 libdbus-1-3 libdrm2 libgbm1 libglib2.0-0t64 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 \
texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-xetex texlive-science \
qemu-user-static binfmt-support qemu-user-binfmt \
emacs-nox && \
rm -rf /var/lib/apt/lists/*
RUN useradd -u 10000 -m -d /opt/data hermes
COPY --chmod=0755 --from=gosu_source /gosu /usr/local/bin/
COPY --chmod=0755 --from=uv_source /usr/local/bin/uv /usr/local/bin/uvx /usr/local/bin/
WORKDIR /opt/hermes
COPY package.json package-lock.json ./
COPY web/package.json web/package-lock.json web/
RUN npm install --prefer-offline --no-audit && \
npx playwright install --with-deps chromium --only-shell && \
(cd web && npm install --prefer-offline --no-audit) && \
npm cache clean --force
COPY --chown=hermes:hermes . .
RUN cd web && npm run build
USER root
RUN chmod -R a+rX /opt/hermes
RUN uv venv && \
uv pip install --no-cache-dir -e ".[all]"
ENV HERMES_WEB_DIST=/opt/hermes/hermes_cli/web_dist
ENV HERMES_HOME=/opt/data
ENV PATH="/opt/data/.local/bin:${PATH}"
VOLUME [ "/opt/data" ]
ENTRYPOINT [ "/usr/bin/tini", "-g", "--", "/opt/hermes/docker/entrypoint.sh" ]

View File

@@ -26,7 +26,9 @@ services:
- "traefik.http.routers.webui-https.tls.certresolver=njalla"
hermes:
image: nousresearch/hermes-agent:latest
build:
context: ./hermes
dockerfile: Dockerfile
container_name: hermes
restart: always
# Gateway run enables the internal API server on port 8642

10
ai/hermes/Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM nousresearch/hermes-agent:latest
# Install Chromium for browser tool
RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Set environment variable for Chromium path
ENV CHROME_EXECUTABLE=/usr/bin/chromium