Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +20 -4
Dockerfile
CHANGED
|
@@ -2,17 +2,33 @@ FROM ubuntu:24.04
|
|
| 2 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
ENV HOME=/home/ubuntu
|
| 4 |
|
| 5 |
-
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 8 |
|
| 9 |
# Install Python packages
|
| 10 |
-
RUN pip3 install --break-system-packages
|
|
|
|
|
|
|
| 11 |
|
| 12 |
# Install Hermes Agent from GitHub
|
| 13 |
-
RUN git clone --depth 1 https://github.com/NousResearch/hermes-agent.git /tmp/hermes &&
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
# Install useful CLI tools
|
| 16 |
RUN npm install -g npx yarn 2>/dev/null || true
|
| 17 |
|
| 18 |
RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
|
|
|
| 2 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
ENV HOME=/home/ubuntu
|
| 4 |
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
curl sudo git wget build-essential python3 python3-pip python3-venv \
|
| 7 |
+
vim nano tmux htop jq zip unzip less file \
|
| 8 |
+
openssh-client net-tools iproute2 dnsutils \
|
| 9 |
+
nodejs npm ca-certificates gnupg \
|
| 10 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 13 |
|
| 14 |
# Install Python packages
|
| 15 |
+
RUN pip3 install --break-system-packages \
|
| 16 |
+
requests httpx flask fastapi uvicorn pyyaml rich \
|
| 17 |
+
huggingface_hub openai anthropic
|
| 18 |
|
| 19 |
# Install Hermes Agent from GitHub
|
| 20 |
+
RUN git clone --depth 1 https://github.com/NousResearch/hermes-agent.git /tmp/hermes && \
|
| 21 |
+
cd /tmp/hermes && \
|
| 22 |
+
pip3 install --break-system-packages -e . && \
|
| 23 |
+
echo "hermes installed: $(which hermes 2>/dev/null || echo 'NOT_FOUND')" > /home/ubuntu/hermes_version.txt && \
|
| 24 |
+
hermes --version >> /home/ubuntu/hermes_version.txt 2>&1 || \
|
| 25 |
+
echo "hermes --version failed" >> /home/ubuntu/hermes_version.txt && \
|
| 26 |
+
rm -rf /tmp/hermes
|
| 27 |
+
|
| 28 |
+
# Create health check endpoint
|
| 29 |
+
RUN echo '#!/bin/bash\necho "Content-Type: text/plain"\necho ""\ncat /home/ubuntu/hermes_version.txt 2>/dev/null || echo "no version file"\nwhich hermes 2>/dev/null || echo "hermes not in PATH"\npip3 list 2>/dev/null | grep -i hermes || echo "hermes not in pip"' > /home/ubuntu/health.sh && \
|
| 30 |
+
chmod +x /home/ubuntu/health.sh
|
| 31 |
|
|
|
|
| 32 |
RUN npm install -g npx yarn 2>/dev/null || true
|
| 33 |
|
| 34 |
RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|