Spaces:
Sleeping
Sleeping
Upload Dockerfile with huggingface_hub
Browse files3 unmodified lines4567891010 unmodified lines21222324252627282930313233348 unmodified lines4344454647484950515253545556575859601 unmodified line6263646566676836 unmodified lines1051061071081091101111123 unmodified linesUSER root# 1. Install dependencies including python3-pipRUN apt-get update && apt-get install -y --no-install-recommends \curl jq python3-pip \&& rm -rf /var/lib/apt/lists/*10 unmodified lines# 4. Copy Marimo notebookCOPY marimo_sandbox.py /app/marimo/marimo_sandbox.py# 5. Create startup scriptRUN cat > /app/start.sh << 'EOF'#!/bin/bashset -eecho "π Starting Marimo Zero..."# Parse API_KEYS_JSONif [ -n "$API_KEYS_JSON" ]; thenecho "π Loading API keys..."export OPENAI_API_KEY=$(echo $API_KEYS_JSON | jq -r '.openai // empty')8 unmodified linesomniroute start --port 20128 --accounts /app/.omniroute/accounts.json &sleep 2# Start Agent Zero (from base image)echo "π€ Starting Agent Zero..."# Agent Zero typically runs via zeroclaw or its own entrypoint# We need to find and run itif command -v zeroclaw &> /dev/null; thenzeroclaw gateway --port 80 &sleep 5elif [ -f /app/entrypoint.sh ]; then/app/entrypoint.sh &sleep 5elseecho "Warning: No Agent Zero entrypoint found"fi# Start Marimo1 unmodified linemarimo run /app/marimo/marimo_sandbox.py --host 0.0.0.0 --port 8081 --headless &sleep 3# Start proxy (Agent Zero on 80, Marimo on 8081, all on 7860)echo "π Starting proxy..."python3 << 'PROXY'from fastapi import FastAPI, Request36 unmodified linesPROXYecho "β Ready!"echo " Agent Zero: http://localhost:7860"echo " Marimo: http://localhost:7860/marimo/"waitEOF3 unmodified lines4567891010 unmodified lines21222324252627282930313233348 unmodified lines4344454647484950515253545556575859606162636465666768697071721 unmodified line7475767778798036 unmodified lines1171181191201211223 unmodified linesUSER root# 1. Install dependenciesRUN apt-get update && apt-get install -y --no-install-recommends \curl jq python3-pip \&& rm -rf /var/lib/apt/lists/*10 unmodified lines# 4. Copy Marimo notebookCOPY marimo_sandbox.py /app/marimo/marimo_sandbox.py# 5. Create startup script that ALSO starts base image servicesRUN cat > /app/start.sh << 'EOF'#!/bin/bashset -eecho "π Starting Marimo Zero..."# Parse API keysif [ -n "$API_KEYS_JSON" ]; thenecho "π Loading API keys..."export OPENAI_API_KEY=$(echo $API_KEYS_JSON | jq -r '.openai // empty')8 unmodified linesomniroute start --port 20128 --accounts /app/.omniroute/accounts.json &sleep 2# Start Agent Zero services from base image# The base image typically runs a Node.js web UI and Python backendecho "π€ Starting Agent Zero services..."# Check for and run the base image entrypointif [ -f /entrypoint.sh ]; thenecho "Running base entrypoint..."/entrypoint.sh &sleep 5elif [ -f /app/run.py ]; thenecho "Running run.py..."python3 /app/run.py &sleep 5elif [ -f /app/run_ui.py ]; thenecho "Running run_ui.py..."python3 /app/run_ui.py &sleep 5elif command -v node &> /dev/null && [ -f /app/server.js ]; thenecho "Running Node.js server..."node /app/server.js &sleep 5elseecho "Looking for Agent Zero services..."find / -name "run*.py" -o -name "server.js" -o -name "main.py" 2>/dev/null | head -5fi# Start Marimo1 unmodified linemarimo run /app/marimo/marimo_sandbox.py --host 0.0.0.0 --port 8081 --headless &sleep 3# Start proxyecho "π Starting proxy..."python3 << 'PROXY'from fastapi import FastAPI, Request36 unmodified linesPROXYecho "β Ready!"waitEOF
Dockerfile+25-15