pudu-ai 0.2.14 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +46 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -658,6 +658,11 @@ async function detectRuntimes() {
|
|
|
658
658
|
label: "llama-bench",
|
|
659
659
|
detected: llamaBench
|
|
660
660
|
});
|
|
661
|
+
statuses.push({
|
|
662
|
+
id: "docker",
|
|
663
|
+
label: "Docker",
|
|
664
|
+
detected: Boolean(await commandExists("docker"))
|
|
665
|
+
});
|
|
661
666
|
return statuses;
|
|
662
667
|
}
|
|
663
668
|
|
|
@@ -840,6 +845,11 @@ var en = {
|
|
|
840
845
|
compareNeedBench: "Need 2+ measured models. Press [B] to benchmark first.",
|
|
841
846
|
reqOllama: "install: https://ollama.com/download or brew install ollama",
|
|
842
847
|
reqLmStudio: "install: https://lmstudio.ai",
|
|
848
|
+
reqDocker: "install: https://docs.docker.com/get-docker/ or brew install --cask docker",
|
|
849
|
+
dockerHint: "press 4 to run ollama/ollama in Docker",
|
|
850
|
+
dockerStarting: "Starting ollama/ollama container\u2026",
|
|
851
|
+
dockerRunOk: "Docker Ollama is up on port 11434 (name: pudu-ollama).",
|
|
852
|
+
dockerRunFail: "docker run failed. Is Docker Desktop running?",
|
|
843
853
|
aboutHistory: "Shows local benchmark files in ~/.pudu-ai/benchmarks. Use it to replay what this machine actually did.",
|
|
844
854
|
aboutDoctor: "Checks Node, Apple Silicon/Metal, Ollama, llama-bench, and the CanIRun API. Use it to see what is missing before a bench or launch.",
|
|
845
855
|
aboutReport: "Writes the latest measured run as Markdown. Use it to paste results into GitHub or notes.",
|
|
@@ -1029,6 +1039,11 @@ var es = {
|
|
|
1029
1039
|
compareNeedBench: "Hacen falta 2+ modelos medidos. Pulsa [B] para hacer un benchmark primero.",
|
|
1030
1040
|
reqOllama: "instalar: https://ollama.com/download o brew install ollama",
|
|
1031
1041
|
reqLmStudio: "instalar: https://lmstudio.ai",
|
|
1042
|
+
reqDocker: "instalar: https://docs.docker.com/get-docker/ o brew install --cask docker",
|
|
1043
|
+
dockerHint: "pulsa 4 para correr ollama/ollama en Docker",
|
|
1044
|
+
dockerStarting: "Arrancando contenedor ollama/ollama\u2026",
|
|
1045
|
+
dockerRunOk: "Ollama en Docker est\xE1 en el puerto 11434 (nombre: pudu-ollama).",
|
|
1046
|
+
dockerRunFail: "fall\xF3 docker run. \xBFDocker Desktop est\xE1 abierto?",
|
|
1032
1047
|
aboutHistory: "Muestra los JSON locales en ~/.pudu-ai/benchmarks. Sirve para ver qu\xE9 hizo realmente esta m\xE1quina.",
|
|
1033
1048
|
aboutDoctor: "Revisa Node, Apple Silicon/Metal, Ollama, llama-bench y la API de CanIRun. Sirve para ver qu\xE9 falta antes de un bench o un launch.",
|
|
1034
1049
|
aboutReport: "Exporta la \xFAltima corrida medida en Markdown. Sirve para pegar resultados en GitHub o notas.",
|
|
@@ -1481,6 +1496,7 @@ async function detectAgents() {
|
|
|
1481
1496
|
}
|
|
1482
1497
|
return out;
|
|
1483
1498
|
}
|
|
1499
|
+
var DOCKER_OLLAMA = "docker run -d --name pudu-ollama -p 11434:11434 -v ollama:/root/.ollama ollama/ollama";
|
|
1484
1500
|
|
|
1485
1501
|
// src/session/load.ts
|
|
1486
1502
|
async function loadSession(options) {
|
|
@@ -2283,6 +2299,7 @@ function doctorText(session) {
|
|
|
2283
2299
|
),
|
|
2284
2300
|
...session.runtimes.find((r) => r.id === "ollama")?.detected ? [] : [`\u25CB Ollama ${t("reqOllama")}`],
|
|
2285
2301
|
...session.runtimes.find((r) => r.id === "lmstudio")?.detected ? [] : [`\u25CB LM Studio ${t("reqLmStudio")}`],
|
|
2302
|
+
...session.runtimes.find((r) => r.id === "docker")?.detected ? [`\u2713 Docker ${t("dockerHint")}`] : [`\u25CB Docker ${t("reqDocker")}`],
|
|
2286
2303
|
"",
|
|
2287
2304
|
session.llamaBench ? t("doctorReady", { count: session.models.filter((m) => m.artifactPath).length }) : t("doctorNoBench")
|
|
2288
2305
|
];
|
|
@@ -2584,6 +2601,14 @@ ${launched.stderr || launched.stdout || t("launchExecFail")}`
|
|
|
2584
2601
|
return { ok: true, log: `${lines.join("\n")}
|
|
2585
2602
|
${launched.stdout}`.trim() };
|
|
2586
2603
|
}
|
|
2604
|
+
async function executeDockerOllama() {
|
|
2605
|
+
const args2 = DOCKER_OLLAMA.split(" ").slice(1);
|
|
2606
|
+
const result = await runCommand("docker", args2, { timeout: 10 * 6e4 });
|
|
2607
|
+
if (result.exitCode !== 0) {
|
|
2608
|
+
return { ok: false, log: result.stderr || t("dockerRunFail") };
|
|
2609
|
+
}
|
|
2610
|
+
return { ok: true, log: t("dockerRunOk") };
|
|
2611
|
+
}
|
|
2587
2612
|
|
|
2588
2613
|
// src/integrations/pull.ts
|
|
2589
2614
|
var INSTALLABLE = ["S", "A", "B"];
|
|
@@ -2633,6 +2658,20 @@ function SetupView({ session }) {
|
|
|
2633
2658
|
setBusy(false);
|
|
2634
2659
|
});
|
|
2635
2660
|
}
|
|
2661
|
+
if (input === "4") {
|
|
2662
|
+
const docker = session.runtimes.find((r) => r.id === "docker")?.detected;
|
|
2663
|
+
if (!docker) {
|
|
2664
|
+
setLog(t("reqDocker"));
|
|
2665
|
+
return;
|
|
2666
|
+
}
|
|
2667
|
+
setBusy(true);
|
|
2668
|
+
setLog(t("dockerStarting"));
|
|
2669
|
+
void executeDockerOllama().then((result) => {
|
|
2670
|
+
setLog(result.log);
|
|
2671
|
+
setBusy(false);
|
|
2672
|
+
});
|
|
2673
|
+
return;
|
|
2674
|
+
}
|
|
2636
2675
|
const tool = TOOLS.find((item) => item.key === input)?.id;
|
|
2637
2676
|
if (tool && rec) {
|
|
2638
2677
|
const decision = decideLaunch(session, tool);
|
|
@@ -2671,6 +2710,12 @@ function SetupView({ session }) {
|
|
|
2671
2710
|
agent.label,
|
|
2672
2711
|
agent.detected ? "" : ` \u2192 ${agent.launch}`
|
|
2673
2712
|
] }, agent.id)),
|
|
2713
|
+
/* @__PURE__ */ jsxs6(Text6, { color: session.runtimes.find((r) => r.id === "docker")?.detected ? "green" : "yellow", children: [
|
|
2714
|
+
"[4] ",
|
|
2715
|
+
session.runtimes.find((r) => r.id === "docker")?.detected ? "\u2713" : "\u25CB",
|
|
2716
|
+
" Docker",
|
|
2717
|
+
session.runtimes.find((r) => r.id === "docker")?.detected ? ` \u2192 ${t("dockerHint")}` : ` \u2192 ${t("reqDocker")}`
|
|
2718
|
+
] }),
|
|
2674
2719
|
/* @__PURE__ */ jsx6(Text6, { dimColor: true, children: fit(
|
|
2675
2720
|
`Ollama: ${session.runtimes.find((r) => r.id === "ollama")?.detected ? "\u2713" : t("reqOllama")} LM Studio: ${session.runtimes.find((r) => r.id === "lmstudio")?.detected ? "\u2713" : t("reqLmStudio")}`,
|
|
2676
2721
|
cols
|
|
@@ -3164,7 +3209,7 @@ function handleAppKey(screen, input, key) {
|
|
|
3164
3209
|
if (letter === "q") return { type: "quit" };
|
|
3165
3210
|
if (key.escape) return screen === "home" ? { type: "quit" } : { type: "home" };
|
|
3166
3211
|
if (screen === "setup") {
|
|
3167
|
-
if (letter === "i" || letter === "1" || letter === "2" || letter === "3") return { type: "ignore" };
|
|
3212
|
+
if (letter === "i" || letter === "1" || letter === "2" || letter === "3" || letter === "4") return { type: "ignore" };
|
|
3168
3213
|
}
|
|
3169
3214
|
const nav = globalNav(letter);
|
|
3170
3215
|
if (nav) return nav;
|