File size: 1,473 Bytes
a8cd9d1
 
 
 
f098a29
a8cd9d1
f098a29
 
a8cd9d1
 
f098a29
a8cd9d1
 
f098a29
 
 
 
 
 
 
 
 
a8cd9d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f098a29
a8cd9d1
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM nousresearch/hermes-agent:latest

USER root

# System packages
RUN apt-get update -qq && \
    apt-get install -y --no-install-recommends \
        nginx git curl procps netcat-openbsd python3-venv && \
    rm -rf /var/lib/apt/lists/*

# Clone hermes-webui
RUN git clone --depth 1 https://github.com/nesquena/hermes-webui.git /opt/hermes-webui

# Install hermes-webui in its own venv (avoids conflicts with hermes-agent deps)
RUN python3 -m venv /opt/webui-venv && \
    /opt/webui-venv/bin/pip install --no-cache-dir --upgrade pip && \
    if [ -f /opt/hermes-webui/requirements.txt ]; then \
        /opt/webui-venv/bin/pip install --no-cache-dir -r /opt/hermes-webui/requirements.txt; \
    else \
        /opt/webui-venv/bin/pip install --no-cache-dir flask flask-cors requests watchdog; \
    fi && \
    /opt/webui-venv/bin/pip install --no-cache-dir -e /opt/hermes || true

COPY nginx.conf      /etc/nginx/conf.d/hermes.conf
COPY entrypoint.sh   /app/entrypoint.sh
COPY setup-hermes.sh /app/setup-hermes.sh

RUN rm -f /etc/nginx/sites-enabled/default && \
    chmod +x /app/entrypoint.sh /app/setup-hermes.sh && \
    mkdir -p /data && chmod 777 /data && \
    mkdir -p /run/nginx

ENV HERMES_HOME=/data
ENV HERMES_WEBUI_HOST=0.0.0.0
ENV HERMES_WEBUI_PORT=8787
ENV HERMES_WEBUI_STATE_DIR=/data/webui
ENV HERMES_WEBUI_AGENT_DIR=/opt/hermes
ENV HERMES_WEBUI_PYTHON=/opt/webui-venv/bin/python3
ENV PYTHONUNBUFFERED=1

EXPOSE 7860

ENTRYPOINT ["/app/entrypoint.sh"]