Spaces:
Sleeping
Sleeping
Start Ollama and configure Marimo AI
Browse files- scripts/entrypoint.sh +35 -8
scripts/entrypoint.sh
CHANGED
|
@@ -90,14 +90,41 @@ GRAPH_VIEWER_PORT=7861 start_with_retry "Graph Viewer" "node /app/scripts/graph-
|
|
| 90 |
|
| 91 |
log "All infrastructure ready! Launching Marimo UI on port 7860..."
|
| 92 |
|
| 93 |
-
# Setup
|
| 94 |
-
mkdir -p /home/node/.
|
| 95 |
-
cp /app/
|
| 96 |
-
log "✓
|
| 97 |
-
|
| 98 |
-
#
|
| 99 |
-
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
# Initialize Pi (accepts config, creates necessary files)
|
| 103 |
log "Initializing Pi agent..."
|
|
|
|
| 90 |
|
| 91 |
log "All infrastructure ready! Launching Marimo UI on port 7860..."
|
| 92 |
|
| 93 |
+
# Setup Ollama config (proxy to ZeroClaw)
|
| 94 |
+
mkdir -p /home/node/.ollama
|
| 95 |
+
cp /app/ollama-config.json /home/node/.ollama/config.json 2>/dev/null || true
|
| 96 |
+
log "✓ Ollama configured to proxy to ZeroClaw"
|
| 97 |
+
|
| 98 |
+
# Start Ollama serve (in background)
|
| 99 |
+
log "Starting Ollama..."
|
| 100 |
+
nohup ollama serve > /tmp/ollama.log 2>&1 &
|
| 101 |
+
OLLAMA_PID=$!
|
| 102 |
+
sleep 3
|
| 103 |
+
if ps -p $OLLAMA_PID > /dev/null; then
|
| 104 |
+
log "✓ Ollama started (PID: $OLLAMA_PID)"
|
| 105 |
+
# Pull a default model
|
| 106 |
+
log "Pulling default model (this may take a minute)..."
|
| 107 |
+
ollama pull llama3.2 || log "⚠️ Could not pull model, will use ZeroClaw models"
|
| 108 |
+
else
|
| 109 |
+
log "⚠️ Ollama failed to start"
|
| 110 |
+
fi
|
| 111 |
+
|
| 112 |
+
# Setup Marimo config (pre-configured with Ollama as AI provider)
|
| 113 |
+
mkdir -p /home/node/.config/marimo
|
| 114 |
+
cat > /home/node/.config/marimo/marimo.toml << 'TOML'
|
| 115 |
+
[ai]
|
| 116 |
+
enabled = true
|
| 117 |
+
|
| 118 |
+
[ai.providers.ollama]
|
| 119 |
+
name = "Ollama"
|
| 120 |
+
base_url = "http://localhost:11434/v1"
|
| 121 |
+
api_key = "ollama-local-key"
|
| 122 |
+
|
| 123 |
+
[[ai.models]]
|
| 124 |
+
provider = "ollama"
|
| 125 |
+
model = "zeroclaw/default"
|
| 126 |
+
TOML
|
| 127 |
+
log "✓ Marimo AI config created with Ollama provider"
|
| 128 |
|
| 129 |
# Initialize Pi (accepts config, creates necessary files)
|
| 130 |
log "Initializing Pi agent..."
|