hermes / Dockerfile
Subsequently's picture
Update Dockerfile
f098a29 verified
Raw History Blame Contribute Delete
1.47 kB
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"]