can1357/oh-my-pi · error · Error
ONNX Runtime CUDA provider install completed but ${stillMiss
Error message
ONNX Runtime CUDA provider install completed but ${stillMissing.join(", ")} are still missing from ${binDir}. Remove the tiny-model side runtime cache at ${runtimeDir} and retry. What it means
After running onnxruntime-node's install script for the CUDA providers, ensureOnnxRuntimeCudaProviders re-checks the expected .so files in binDir. If some are still missing even though the script exited 0, the install silently failed to place binaries, and this error lists exactly which files remain absent.
Source
Thrown at packages/coding-agent/src/subprocess/worker-runtime.ts:251
*/
export async function ensureOnnxRuntimeCudaProviders(
runtimeDir: string,
device = process.env.PI_TINY_DEVICE,
): Promise<void> {
if (!shouldInstallOnnxRuntimeCudaProviders(device)) return;
const nodeModules = path.join(runtimeDir, "node_modules");
const manifest = resolveRuntimeModule(nodeModules, `${ONNX_RUNTIME_NODE_PACKAGE}/package.json`);
if (!manifest)
throw new Error(`Unable to resolve ${ONNX_RUNTIME_NODE_PACKAGE} in compiled runtime at ${nodeModules}`);
const packageDir = path.dirname(manifest);
const binDir = path.join(packageDir, LINUX_X64_ONNX_RUNTIME_CUDA_PROVIDER_DIR);
const missing = await missingOnnxRuntimeCudaProviderFiles(binDir);
if (missing.length === 0) return;
await installOnnxRuntimeCudaProviders(packageDir, runtimeDir, binDir);
const stillMissing = await missingOnnxRuntimeCudaProviderFiles(binDir);
if (stillMissing.length === 0) return;
throw new Error(
`ONNX Runtime CUDA provider install completed but ${stillMissing.join(", ")} are still missing from ${binDir}. Remove the tiny-model side runtime cache at ${runtimeDir} and retry.`,
);
}
/**
* Prepare a freshly-installed compiled runtime for loading and return the
* absolute entrypoint of `packageName` to `require`.
*/
async function prepareCompiledRuntime(runtimeDir: string, packageName: string): Promise<string> {
const nodeModules = await installSharpStubResolver(runtimeDir);
const entry = resolveRuntimeModule(nodeModules, packageName);
if (!entry) throw new Error(`Unable to resolve ${packageName} in compiled runtime at ${nodeModules}`);
return entry;
}
// ── Transformers version resolution ─────────────────────────────────
function resolveTransformersVersionSpec(): string {View on GitHub (pinned to 9690622007)
Solutions
- Note the listed still-missing files; check install script stdout/stderr from the previous attempt for a skip reason (unsupported CUDA version, musl, etc.).
- Remove the tiny-model side runtime cache at runtimeDir and retry on a supported glibc-based linux x64 with compatible NVIDIA drivers.
- Upgrade onnxruntime-node in the side runtime to a version whose install script supports your platform.
- Fall back to PI_TINY_DEVICE=cpu if the GPU path cannot be satisfied.
Defensive patterns
Strategy: fallback
Validate before calling
// after install, verify expected files yourself before relying on the runtime
const expected = ["libonnxruntime_providers_cuda.so", "libonnxruntime_providers_shared.so"];
const missing = [];
for (const f of expected) {
try { await access(path.join(binDir, f)); } catch { missing.push(f); }
}
if (missing.length) console.warn("CUDA provider incomplete:", missing); Try / catch
try {
await ensureOnnxRuntimeCudaProviders(runtimeDir, "cuda");
} catch (err) {
if (String(err.message).includes("still missing")) {
logger.warn("CUDA providers incomplete; falling back to CPU", { detail: err.message });
process.env.PI_TINY_DEVICE = "cpu";
} else throw err;
} Prevention
- Use supported platforms: glibc-based linux x64 with compatible NVIDIA drivers/CUDA.
- Avoid musl/Alpine for the CUDA provider path unless onnxruntime-node officially supports it.
- Check install script output for silent skips; upgrade onnxruntime-node if your CUDA version is unsupported.
- Default to cpu device when GPU prerequisites cannot be guaranteed.
When it happens
Trigger: installOnnxRuntimeCudaProviders succeeds (exit 0) but a follow-up missingOnnxRuntimeCudaProviderFiles(binDir) still returns entries — e.g. the script downloaded a CPU-only layout, wrote to a different linux/x64 dir, or skipped files for an incompatible CUDA/glibc version.
Common situations: Mismatched CUDA toolkit expectations (script decides the platform is unsupported and no-ops), odd glibc/musl (Alpine) environments where the script skips installation, or a read-only/full disk that silently dropped files.
Related errors
- ONNX Runtime CUDA provider binaries are missing from ${binDi
- Failed to install ONNX Runtime CUDA provider binaries into $
- Unable to resolve ${ONNX_RUNTIME_NODE_PACKAGE} in compiled r
- imageUrls exposure "${name}" requires the ${name} binary on
- the configured command binary does not exist
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/5f2bf07467e5b1e6.
Report an issue: GitHub.