Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +42 -0
Dockerfile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
|
| 3 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
+
ENV HOME=/root
|
| 5 |
+
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
curl \
|
| 8 |
+
git \
|
| 9 |
+
python3 \
|
| 10 |
+
python3-pip \
|
| 11 |
+
python3-venv \
|
| 12 |
+
nodejs \
|
| 13 |
+
npm \
|
| 14 |
+
build-essential \
|
| 15 |
+
clang \
|
| 16 |
+
cmake \
|
| 17 |
+
sudo \
|
| 18 |
+
wget \
|
| 19 |
+
tini \
|
| 20 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
+
|
| 22 |
+
# Install ttyd based on host architecture
|
| 23 |
+
RUN ARCH=$(uname -m) && \
|
| 24 |
+
if [ "$ARCH" = "x86_64" ]; then DOWNLOAD_ARCH="x86_64"; else DOWNLOAD_ARCH="aarch64"; fi && \
|
| 25 |
+
wget -O /usr/local/bin/ttyd https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.${DOWNLOAD_ARCH} && \
|
| 26 |
+
chmod +x /usr/local/bin/ttyd
|
| 27 |
+
|
| 28 |
+
# Install the Hermes Agent Framework globally via the official script
|
| 29 |
+
RUN curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
|
| 30 |
+
|
| 31 |
+
WORKDIR /workspace
|
| 32 |
+
|
| 33 |
+
# Copy the wrapper script into the container workspace
|
| 34 |
+
COPY entrypoint.sh /workspace/entrypoint.sh
|
| 35 |
+
RUN chmod +x /workspace/entrypoint.sh
|
| 36 |
+
|
| 37 |
+
EXPOSE 7860
|
| 38 |
+
|
| 39 |
+
ENTRYPOINT ["/usr/bin/tini", "--"]
|
| 40 |
+
|
| 41 |
+
# ttyd now spawns the wrapper instead of a raw bash shell, locking the web interface to Hermes
|
| 42 |
+
CMD ["/usr/local/bin/ttyd", "--writable", "--port", "7860", "/workspace/entrypoint.sh"]
|