add dockerfile and docker-compose file

This commit is contained in:
Кобылкевич Фёдор 2026-03-26 10:50:19 +03:00
parent 566dc54610
commit 2f74daa8a6
4 changed files with 71 additions and 0 deletions

0
.env.example Normal file
View file

11
.gitignore vendored
View file

@ -51,5 +51,16 @@ $RECYCLE.BIN/
# Windows shortcuts # Windows shortcuts
*.lnk *.lnk
.env
hermes_data/*
workspace/*
SOLUTION_SUMMARY.md
BROWSER_USE_QUICKSTART.md
BROWSER_USE_SETUP.md
START_HERE.md
*/config.yaml
*.idea *.idea

29
Dockerfile Normal file
View file

@ -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"]

31
docker-compose.yml Normal file
View file

@ -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