Brain Deployer commited on
Commit
ddfe3bc
·
1 Parent(s): 380a0ba

Initialize ultra-light ttyd Web Terminal for Brain17

Browse files
Files changed (2) hide show
  1. Dockerfile +49 -0
  2. setup_repos.sh +22 -0
Dockerfile ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:22.04
2
+
3
+ # Avoid prompts during apt installs
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ # Update and install dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ curl \
9
+ git \
10
+ wget \
11
+ sudo \
12
+ python3 \
13
+ python3-pip \
14
+ python3-venv \
15
+ build-essential \
16
+ cmake \
17
+ libjson-c-dev \
18
+ libwebsockets-dev \
19
+ sshfs \
20
+ fuse \
21
+ dos2unix \
22
+ nano \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ # Enable FUSE for non-root users
26
+ RUN echo "user_allow_other" >> /etc/fuse.conf
27
+
28
+ # Install ttyd from source or pre-compiled binary
29
+ RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.4/ttyd.x86_64 -O /usr/local/bin/ttyd && \
30
+ chmod +x /usr/local/bin/ttyd
31
+
32
+ # Create user with UID 1000
33
+ RUN useradd -m -s /bin/bash -u 1000 user && \
34
+ usermod -aG sudo user && \
35
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
36
+
37
+ # Setup working directory
38
+ WORKDIR /code
39
+ COPY --chown=user:user . /code
40
+
41
+ RUN chmod +x /code/*.sh || true && \
42
+ dos2unix /code/*.sh || true
43
+
44
+ USER user
45
+ ENV HOME=/home/user
46
+ ENV PATH=/home/user/.local/bin:$PATH
47
+
48
+ # Start ttyd on port 7860, running bash
49
+ CMD ["ttyd", "-p", "7860", "-W", "bash"]
setup_repos.sh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ echo "============================================"
4
+ echo " BRAIN15 - INITIALIZING ORIGINAL CONTENT "
5
+ echo "============================================"
6
+
7
+ # 1. Clonar repositorios originales puros de Hugging Face
8
+ echo "[*] Clonando repositorio: Qwen Space (Brain)..."
9
+ git clone https://huggingface.co/spaces/Elliotasdasdasfasas/brain original_brain
10
+
11
+ echo "[*] Clonando repositorio: CTM Space (Redneural)..."
12
+ git clone https://huggingface.co/spaces/robot-gansta/redneural original_redneural
13
+
14
+ echo "[*] Clonación completada!"
15
+ echo ""
16
+ echo "============================================"
17
+ echo " CONFIGURACION LISTA "
18
+ echo "============================================"
19
+ echo "Para instalar dependencias en caliente y evitar que el Space crashee:"
20
+ echo "cd original_brain && pip install -r requirements.txt"
21
+ echo "o"
22
+ echo "cd original_redneural && pip install -r requirements.txt"