Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/lib/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,15 @@ async function promptOllamaModel(gpu = null) {
return promptManualModelId(" Ollama model id: ", "Ollama");
}

function printOllamaExposureWarning() {
console.log("");
console.log(" ⚠ Ollama is binding to 0.0.0.0 so the sandbox can reach it via Docker.");
console.log(" This exposes the Ollama API to your local network (no auth required).");
console.log(" On public WiFi, any device on the same network can send prompts to your GPU.");
console.log(" See: CNVD-2025-04094, CVE-2024-37032");
console.log("");
}

function pullOllamaModel(model) {
const result = spawnSync("bash", ["-c", `ollama pull ${shellQuote(model)}`], {
cwd: ROOT,
Expand Down Expand Up @@ -3362,6 +3371,7 @@ async function setupNim(gpu) {
const ollamaEnv = isWsl() ? "" : `OLLAMA_HOST=0.0.0.0:${OLLAMA_PORT} `;
run(`${ollamaEnv}ollama serve > /dev/null 2>&1 &`, { ignoreError: true });
sleep(2);
if (!isWsl()) printOllamaExposureWarning();
}
console.log(` ✓ Using Ollama on localhost:${OLLAMA_PORT}`);
provider = "ollama-local";
Expand Down Expand Up @@ -3420,6 +3430,7 @@ async function setupNim(gpu) {
console.log(" Starting Ollama...");
run(`OLLAMA_HOST=0.0.0.0:${OLLAMA_PORT} ollama serve > /dev/null 2>&1 &`, { ignoreError: true });
sleep(2);
printOllamaExposureWarning();
console.log(` ✓ Using Ollama on localhost:${OLLAMA_PORT}`);
provider = "ollama-local";
credentialEnv = "OPENAI_API_KEY";
Expand Down
Loading