omnius 1.0.438 → 1.0.439
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/index.js +59 -22
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -603492,8 +603492,8 @@ function purgeVenvTorch(pip) {
|
|
|
603492
603492
|
);
|
|
603493
603493
|
return `${purge.stdout || ""}${purge.stderr || ""}`;
|
|
603494
603494
|
}
|
|
603495
|
-
function jetsonTorchInstallSource() {
|
|
603496
|
-
const wheel = discoverJetsonTorchWheel();
|
|
603495
|
+
function jetsonTorchInstallSource(py = getVenvPython()) {
|
|
603496
|
+
const wheel = discoverJetsonTorchWheel(py);
|
|
603497
603497
|
if (wheel) {
|
|
603498
603498
|
return {
|
|
603499
603499
|
source: wheel,
|
|
@@ -603526,11 +603526,16 @@ function torchCudaProbe(py = getVenvPython()) {
|
|
|
603526
603526
|
{ encoding: "utf8", timeout: 3e4 }
|
|
603527
603527
|
);
|
|
603528
603528
|
const log22 = `${probe.stdout || ""}${probe.stderr || ""}`.trim();
|
|
603529
|
-
|
|
603529
|
+
try {
|
|
603530
|
+
return { ok: probe.status === 0, log: log22, json: JSON.parse(probe.stdout || "{}") };
|
|
603531
|
+
} catch {
|
|
603532
|
+
return { ok: probe.status === 0, log: log22 };
|
|
603533
|
+
}
|
|
603530
603534
|
}
|
|
603531
603535
|
function ensureEmbedDeps() {
|
|
603532
603536
|
const venv = getVenvDir();
|
|
603533
603537
|
let log22 = "";
|
|
603538
|
+
const diagnostics = [];
|
|
603534
603539
|
try {
|
|
603535
603540
|
mkdirSync67(venv, { recursive: true });
|
|
603536
603541
|
} catch {
|
|
@@ -603542,6 +603547,7 @@ function ensureEmbedDeps() {
|
|
|
603542
603547
|
}
|
|
603543
603548
|
if (isJetsonHost2() && cudaHardwarePresent() && !asrCpuAllowed()) {
|
|
603544
603549
|
enableVenvSystemSitePackages(venv);
|
|
603550
|
+
diagnostics.push(`Jetson ASR CUDA repair: python=${getVenvPython()} abi=${pythonAbiTag()} cuda=${detectCudaToolkitVersion() || "unknown"} jp_dirs=${jetsonPytorchDirs().join(",")}`);
|
|
603545
603551
|
}
|
|
603546
603552
|
if (venvExisted && !(process.env["OMNIUS_INSTALL_FULL_EMBED_DEPS"] === "1")) {
|
|
603547
603553
|
const check = spawnSync8(
|
|
@@ -603557,6 +603563,7 @@ function ensureEmbedDeps() {
|
|
|
603557
603563
|
if (cudaProbe.ok) {
|
|
603558
603564
|
return { ok: true, log: `embed deps already satisfied; torch CUDA OK ${cudaProbe.log}` };
|
|
603559
603565
|
}
|
|
603566
|
+
diagnostics.push(`Initial venv torch CUDA failed: ${cudaProbe.log}`);
|
|
603560
603567
|
log22 += `embed deps import OK but torch CUDA probe failed; repairing ASR torch. ${cudaProbe.log}
|
|
603561
603568
|
`;
|
|
603562
603569
|
}
|
|
@@ -603568,8 +603575,10 @@ function ensureEmbedDeps() {
|
|
|
603568
603575
|
if (cudaHardwarePresent() && !asrCpuAllowed()) {
|
|
603569
603576
|
const before = torchCudaProbe();
|
|
603570
603577
|
torchOk = before.ok;
|
|
603578
|
+
if (!torchOk) diagnostics.push(`Pre-repair torch probe: ${before.log}`);
|
|
603571
603579
|
if (!torchOk && isJetsonHost2()) {
|
|
603572
603580
|
const systemTorch = torchCudaProbe("python3");
|
|
603581
|
+
diagnostics.push(`System python torch probe: ${systemTorch.log || "unavailable"}`);
|
|
603573
603582
|
if (systemTorch.ok) {
|
|
603574
603583
|
log22 += `Venv torch CUDA probe failed, but system Jetson torch CUDA works; enabling system site packages and removing venv-local torch.
|
|
603575
603584
|
venv=${before.log}
|
|
@@ -603597,19 +603606,25 @@ system=${systemTorch.log}
|
|
|
603597
603606
|
);
|
|
603598
603607
|
log22 += torchDeps.stdout + torchDeps.stderr;
|
|
603599
603608
|
const torchSource = jetsonTorchInstallSource();
|
|
603609
|
+
diagnostics.push(`Jetson torch install source: ${torchSource.source || "not found"}`);
|
|
603600
603610
|
log22 += `Torch CUDA probe failed on Jetson; installing JetPack-compatible PyTorch from ${torchSource.source}
|
|
603601
603611
|
${before.log}
|
|
603602
603612
|
`;
|
|
603603
|
-
|
|
603604
|
-
|
|
603605
|
-
|
|
603606
|
-
|
|
603607
|
-
|
|
603608
|
-
|
|
603609
|
-
|
|
603610
|
-
|
|
603611
|
-
|
|
603613
|
+
if (!torchSource.source) {
|
|
603614
|
+
torchOk = false;
|
|
603615
|
+
} else {
|
|
603616
|
+
const torchInstall = spawnSync8(
|
|
603617
|
+
pip,
|
|
603618
|
+
torchSource.args,
|
|
603619
|
+
{ encoding: "utf8", timeout: 9e5 }
|
|
603620
|
+
);
|
|
603621
|
+
log22 += torchInstall.stdout + torchInstall.stderr;
|
|
603622
|
+
const after = torchCudaProbe();
|
|
603623
|
+
torchOk = after.ok;
|
|
603624
|
+
diagnostics.push(`Post Jetson torch install probe: ${after.log}`);
|
|
603625
|
+
log22 += `Torch CUDA probe after Jetson install: ${after.log}
|
|
603612
603626
|
`;
|
|
603627
|
+
}
|
|
603613
603628
|
} else if (!torchOk) {
|
|
603614
603629
|
log22 += `Torch CUDA probe failed on CUDA host; not allowing ASR CPU fallback. ${before.log}
|
|
603615
603630
|
`;
|
|
@@ -603649,20 +603664,27 @@ ${before.log}
|
|
|
603649
603664
|
if (!torchOk) {
|
|
603650
603665
|
log22 += `Torch CUDA probe still failed after ASR dependency install. ${finalTorch.log}
|
|
603651
603666
|
`;
|
|
603667
|
+
diagnostics.push(`Post ASR dependency torch probe: ${finalTorch.log}`);
|
|
603652
603668
|
if (isJetsonHost2()) {
|
|
603653
603669
|
log22 += "Retrying Jetson torch repair after ASR dependency install to remove any incompatible torch resolver side effects.\n";
|
|
603654
603670
|
log22 += purgeVenvTorch(pip);
|
|
603655
603671
|
const torchSource = jetsonTorchInstallSource();
|
|
603656
|
-
|
|
603657
|
-
|
|
603658
|
-
|
|
603659
|
-
|
|
603660
|
-
|
|
603661
|
-
|
|
603662
|
-
|
|
603663
|
-
|
|
603664
|
-
|
|
603672
|
+
diagnostics.push(`Final Jetson torch repair source: ${torchSource.source || "not found"}`);
|
|
603673
|
+
if (!torchSource.source) {
|
|
603674
|
+
torchOk = false;
|
|
603675
|
+
} else {
|
|
603676
|
+
const retry = spawnSync8(
|
|
603677
|
+
pip,
|
|
603678
|
+
torchSource.args,
|
|
603679
|
+
{ encoding: "utf8", timeout: 9e5 }
|
|
603680
|
+
);
|
|
603681
|
+
log22 += retry.stdout + retry.stderr;
|
|
603682
|
+
const repaired = torchCudaProbe();
|
|
603683
|
+
torchOk = repaired.ok;
|
|
603684
|
+
diagnostics.push(`Final repaired torch probe: ${repaired.log}`);
|
|
603685
|
+
log22 += `Torch CUDA probe after final Jetson repair from ${torchSource.source}: ${repaired.log}
|
|
603665
603686
|
`;
|
|
603687
|
+
}
|
|
603666
603688
|
}
|
|
603667
603689
|
}
|
|
603668
603690
|
}
|
|
@@ -603682,6 +603704,21 @@ ${before.log}
|
|
|
603682
603704
|
fullOk = full.status === 0;
|
|
603683
603705
|
}
|
|
603684
603706
|
const ok3 = asrDepsOk && up.status === 0 && fullOk && torchOk;
|
|
603707
|
+
if (!ok3) {
|
|
603708
|
+
const compact4 = [
|
|
603709
|
+
"ASR dependency setup failed.",
|
|
603710
|
+
...diagnostics,
|
|
603711
|
+
`pip_base_ok=${up.status === 0}`,
|
|
603712
|
+
`asr_deps_ok=${asrDepsOk}`,
|
|
603713
|
+
`full_embed_deps_ok=${fullOk}`,
|
|
603714
|
+
`torch_cuda_ok=${torchOk}`,
|
|
603715
|
+
"Set OMNIUS_JETSON_TORCH_WHEEL=/path/or/url/to/torch-*-linux_aarch64.whl to override auto-discovery."
|
|
603716
|
+
].join("\n");
|
|
603717
|
+
return { ok: ok3, log: `${compact4}
|
|
603718
|
+
|
|
603719
|
+
--- raw pip tail ---
|
|
603720
|
+
${log22.slice(-2e3)}` };
|
|
603721
|
+
}
|
|
603685
603722
|
return { ok: ok3, log: log22 };
|
|
603686
603723
|
}
|
|
603687
603724
|
function runEmbedImage(input) {
|
|
@@ -604298,7 +604335,7 @@ var init_listen = __esm({
|
|
|
604298
604335
|
const res = ensure();
|
|
604299
604336
|
if (res?.log) this.emit("status", res.log.slice(-500));
|
|
604300
604337
|
if (res && res.ok === false) {
|
|
604301
|
-
throw new Error(
|
|
604338
|
+
throw new Error(String(res.log ?? "ASR Python dependency setup failed").slice(0, 2400));
|
|
604302
604339
|
}
|
|
604303
604340
|
}
|
|
604304
604341
|
if (typeof getPy === "function") {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.439",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.439",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED