Remove CUDA/TensorRT providers from onnxruntime-node in managed runtime
linuxdeploy scans all ELF files in the AppDir and fails when it finds libonnxruntime_providers_cuda.so which links to libcublasLt.so.12 — a CUDA library not available on CI runners. onnxruntime falls back to the CPU provider when CUDA is absent, so removing these has no functional impact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
f21221c1e1
commit
006db65f08
@@ -360,6 +360,15 @@ async function pruneOnnxRuntime(runtimeRoot) {
|
|||||||
await removeIfExists(path.join(onnxRoot, "darwin"));
|
await removeIfExists(path.join(onnxRoot, "darwin"));
|
||||||
await removeIfExists(path.join(onnxRoot, "win32"));
|
await removeIfExists(path.join(onnxRoot, "win32"));
|
||||||
await pruneChildrenExcept(path.join(onnxRoot, "linux"), new Set([process.arch]));
|
await pruneChildrenExcept(path.join(onnxRoot, "linux"), new Set([process.arch]));
|
||||||
|
const archDir = path.join(onnxRoot, "linux", process.arch);
|
||||||
|
if (await pathExists(archDir)) {
|
||||||
|
const entries = await fs.readdir(archDir);
|
||||||
|
await Promise.all(
|
||||||
|
entries
|
||||||
|
.filter((name) => name.includes("cuda") || name.includes("tensorrt"))
|
||||||
|
.map((name) => fs.rm(path.join(archDir, name), { force: true }))
|
||||||
|
);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
|
|||||||
Reference in New Issue
Block a user