@rupayan10/aios-cli 0.1.1 → 0.1.3
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.js +8 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3518,7 +3518,7 @@ var init_package = __esm({
|
|
|
3518
3518
|
"package.json"() {
|
|
3519
3519
|
package_default = {
|
|
3520
3520
|
name: "@rupayan10/aios-cli",
|
|
3521
|
-
version: "0.1.
|
|
3521
|
+
version: "0.1.3",
|
|
3522
3522
|
description: "FlowScale AIOS command-line interface",
|
|
3523
3523
|
license: "AGPL-3.0-only",
|
|
3524
3524
|
bin: {
|
|
@@ -3586,7 +3586,8 @@ function detectNvidiaGpus() {
|
|
|
3586
3586
|
try {
|
|
3587
3587
|
const raw = (0, import_child_process.execSync)(
|
|
3588
3588
|
"nvidia-smi --query-gpu=index,name,memory.total --format=csv,noheader,nounits",
|
|
3589
|
-
|
|
3589
|
+
// stdio stderr 'ignore': nvidia-smi is optional, so don't leak "command not found" to the parent's stderr.
|
|
3590
|
+
{ encoding: "utf-8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] }
|
|
3590
3591
|
).trim();
|
|
3591
3592
|
if (!raw) return [];
|
|
3592
3593
|
return raw.split("\n").map((line) => {
|
|
@@ -3604,7 +3605,7 @@ function detectNvidiaGpus() {
|
|
|
3604
3605
|
}
|
|
3605
3606
|
function getGpuNamesFromLspci() {
|
|
3606
3607
|
try {
|
|
3607
|
-
const lspciOutput = (0, import_child_process.execSync)("lspci", { encoding: "utf-8", timeout: 5e3 }).trim();
|
|
3608
|
+
const lspciOutput = (0, import_child_process.execSync)("lspci", { encoding: "utf-8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
3608
3609
|
if (!lspciOutput) return [];
|
|
3609
3610
|
const raw = lspciOutput.split("\n").filter((line) => /vga|3d|display/i.test(line)).join("\n");
|
|
3610
3611
|
if (!raw) return [];
|
|
@@ -3625,7 +3626,9 @@ function detectRocmGpus() {
|
|
|
3625
3626
|
try {
|
|
3626
3627
|
const vramRaw = (0, import_child_process.execSync)("rocm-smi --showmeminfo vram", {
|
|
3627
3628
|
encoding: "utf-8",
|
|
3628
|
-
timeout: 5e3
|
|
3629
|
+
timeout: 5e3,
|
|
3630
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
3631
|
+
// rocm-smi is optional; suppress its stderr on absence.
|
|
3629
3632
|
}).trim();
|
|
3630
3633
|
const vramMap = /* @__PURE__ */ new Map();
|
|
3631
3634
|
for (const line of vramRaw.split("\n")) {
|
|
@@ -5790,7 +5793,7 @@ function upsertModels(comfyPort, models) {
|
|
|
5790
5793
|
writeTxn((db2) => {
|
|
5791
5794
|
db2.prepare("DELETE FROM models WHERE comfy_port = ?").run(comfyPort);
|
|
5792
5795
|
const ins = db2.prepare(`INSERT INTO models (id, filename, path, type, size_bytes, comfy_port, scanned_at) VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
5793
|
-
ON CONFLICT(
|
|
5796
|
+
ON CONFLICT(path) DO UPDATE SET filename = excluded.filename, type = excluded.type, size_bytes = excluded.size_bytes, comfy_port = excluded.comfy_port, scanned_at = excluded.scanned_at`);
|
|
5794
5797
|
for (const m of models) ins.run(m.id, m.filename, m.path, m.type, m.sizeBytes, m.comfyPort, m.scannedAt);
|
|
5795
5798
|
});
|
|
5796
5799
|
}
|