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