From 2f74daa8a6c8f38b1a5325488d558f06305d4f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=B1=D1=8B=D0=BB=D0=BA=D0=B5=D0=B2=D0=B8?= =?UTF-8?q?=D1=87=20=D0=A4=D1=91=D0=B4=D0=BE=D1=80?= Date: Thu, 26 Mar 2026 10:50:19 +0300 Subject: [PATCH] add dockerfile and docker-compose file --- .env.example | 0 .gitignore | 11 +++++++++++ Dockerfile | 29 +++++++++++++++++++++++++++++ docker-compose.yml | 31 +++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) create mode 100644 .env.example create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..e69de29b diff --git a/.gitignore b/.gitignore index bd71037d..b64c303f 100644 --- a/.gitignore +++ b/.gitignore @@ -51,5 +51,16 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk +.env + +hermes_data/* +workspace/* + +SOLUTION_SUMMARY.md +BROWSER_USE_QUICKSTART.md +BROWSER_USE_SETUP.md +START_HERE.md + +*/config.yaml *.idea \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6fdb458a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM python:3.11 + +RUN apt-get update && apt-get install -y \ + git \ + curl \ + build-essential \ + python3-dev \ + libffi-dev \ + && rm -rf /var/lib/apt/lists/* + +RUN git clone https://github.com/NousResearch/hermes-agent.git /opt/hermes-agent + +WORKDIR /opt/hermes-agent +RUN pip install --no-cache-dir -e . +RUN pip install --no-cache-dir python-telegram-bot + +# Isolated runtime for browser-use to avoid dependency conflicts with hermes-agent. +RUN python -m venv /opt/browser-use-venv \ + && /opt/browser-use-venv/bin/pip install --no-cache-dir --upgrade pip \ + && /opt/browser-use-venv/bin/pip install --no-cache-dir browser-use + +RUN ln -s /opt/hermes-agent/venv/bin/hermes /usr/local/bin/hermes 2>/dev/null || true +RUN ln -s /opt/browser-use-venv/bin/python /usr/local/bin/python-browser-use 2>/dev/null || true + +RUN mkdir -p /root/.hermes/skills /root/.hermes/memories /root/.hermes/sessions + +WORKDIR /workspace + +CMD ["bash"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..e8104886 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +services: + chromium: + image: ghcr.io/browserless/chromium:latest + container_name: hermes-chromium + restart: unless-stopped + environment: + - TOKEN=hermes-local + - TIMEOUT=120000 + - CONCURRENT=5 + shm_size: 1gb + ports: + - "3000:3000" + + hermes-agent: + build: . + container_name: hermes-agent + restart: unless-stopped + stdin_open: true + tty: true + depends_on: + - chromium + env_file: + - .env + environment: + - BROWSER_USE_CDP_URL=ws://chromium:3000/playwright?token=hermes-local + - BROWSER_USE_PYTHON=/opt/browser-use-venv/bin/python + volumes: + - ./workspace:/workspace + - ./hermes_data:/root/.hermes + working_dir: /workspace + command: tail -f /dev/null \ No newline at end of file