Update Dockerfile
Browse files- Dockerfile +14 -3
Dockerfile
CHANGED
|
@@ -2,14 +2,24 @@ FROM nousresearch/hermes-agent:latest
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update -qq && \
|
| 6 |
-
apt-get install -y --no-install-recommends
|
|
|
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
|
|
|
| 9 |
RUN git clone --depth 1 https://github.com/nesquena/hermes-webui.git /opt/hermes-webui
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
COPY nginx.conf /etc/nginx/conf.d/hermes.conf
|
| 15 |
COPY entrypoint.sh /app/entrypoint.sh
|
|
@@ -25,6 +35,7 @@ ENV HERMES_WEBUI_HOST=0.0.0.0
|
|
| 25 |
ENV HERMES_WEBUI_PORT=8787
|
| 26 |
ENV HERMES_WEBUI_STATE_DIR=/data/webui
|
| 27 |
ENV HERMES_WEBUI_AGENT_DIR=/opt/hermes
|
|
|
|
| 28 |
ENV PYTHONUNBUFFERED=1
|
| 29 |
|
| 30 |
EXPOSE 7860
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
+
# System packages
|
| 6 |
RUN apt-get update -qq && \
|
| 7 |
+
apt-get install -y --no-install-recommends \
|
| 8 |
+
nginx git curl procps netcat-openbsd python3-venv && \
|
| 9 |
rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Clone hermes-webui
|
| 12 |
RUN git clone --depth 1 https://github.com/nesquena/hermes-webui.git /opt/hermes-webui
|
| 13 |
|
| 14 |
+
# Install hermes-webui in its own venv (avoids conflicts with hermes-agent deps)
|
| 15 |
+
RUN python3 -m venv /opt/webui-venv && \
|
| 16 |
+
/opt/webui-venv/bin/pip install --no-cache-dir --upgrade pip && \
|
| 17 |
+
if [ -f /opt/hermes-webui/requirements.txt ]; then \
|
| 18 |
+
/opt/webui-venv/bin/pip install --no-cache-dir -r /opt/hermes-webui/requirements.txt; \
|
| 19 |
+
else \
|
| 20 |
+
/opt/webui-venv/bin/pip install --no-cache-dir flask flask-cors requests watchdog; \
|
| 21 |
+
fi && \
|
| 22 |
+
/opt/webui-venv/bin/pip install --no-cache-dir -e /opt/hermes || true
|
| 23 |
|
| 24 |
COPY nginx.conf /etc/nginx/conf.d/hermes.conf
|
| 25 |
COPY entrypoint.sh /app/entrypoint.sh
|
|
|
|
| 35 |
ENV HERMES_WEBUI_PORT=8787
|
| 36 |
ENV HERMES_WEBUI_STATE_DIR=/data/webui
|
| 37 |
ENV HERMES_WEBUI_AGENT_DIR=/opt/hermes
|
| 38 |
+
ENV HERMES_WEBUI_PYTHON=/opt/webui-venv/bin/python3
|
| 39 |
ENV PYTHONUNBUFFERED=1
|
| 40 |
|
| 41 |
EXPOSE 7860
|