ameobius commited on
Commit
e7bb2e5
·
verified ·
1 Parent(s): c61db65

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. 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 curl sudo git wget build-essential python3 python3-pip python3-venv vim nano tmux htop jq zip unzip less file openssh-client net-tools iproute2 dnsutils nodejs npm ca-certificates gnupg && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
6
 
7
  RUN curl -fsSL https://code-server.dev/install.sh | sh
8
 
9
  # Install Python packages
10
- RUN pip3 install --break-system-packages requests httpx flask fastapi uvicorn pyyaml rich huggingface_hub openai anthropic
 
 
11
 
12
  # Install Hermes Agent from GitHub
13
- RUN git clone --depth 1 https://github.com/NousResearch/hermes-agent.git /tmp/hermes && cd /tmp/hermes && pip3 install --break-system-packages -e . && rm -rf /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