diff --git a/plugins/core/package-lock.json b/plugins/core/package-lock.json index 8c2e6ca85..b98a18cda 100644 --- a/plugins/core/package-lock.json +++ b/plugins/core/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/core", - "version": "0.3.67", + "version": "0.3.68", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/core", - "version": "0.3.67", + "version": "0.3.68", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/core/package.json b/plugins/core/package.json index 2a915fd25..c6ea1372b 100644 --- a/plugins/core/package.json +++ b/plugins/core/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/core", - "version": "0.3.67", + "version": "0.3.68", "description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/core/src/platform/lxc.ts b/plugins/core/src/platform/lxc.ts index 312348e5c..2a96153a1 100644 --- a/plugins/core/src/platform/lxc.ts +++ b/plugins/core/src/platform/lxc.ts @@ -48,7 +48,7 @@ export async function checkLxcDependencies() { // the current workaround is to install the release manually. // https://github.com/intel/compute-runtime/releases/tag/24.13.29138.7 const output = await new Promise((r,f)=> child_process.exec("sh -c 'apt show versions intel-opencl-icd'", (err, stdout, stderr) => { - if (err) + if (err && !stdout && !stderr) f(err); else r(stdout + '\n' + stderr); @@ -73,6 +73,30 @@ export async function checkLxcDependencies() { sdk.log.a('Failed to verify/install intel-opencl-icd version.'); } + try { + const output = await new Promise((r,f)=> child_process.exec("sh -c 'apt show versions intel-driver-compiler-npu'", (err, stdout, stderr) => { + if (err && !stdout && !stderr) + f(err); + else + r(stdout + '\n' + stderr); + })); + + if ( + // apt + output.includes('No packages found') + ) { + const cp = child_process.spawn('sh', ['-c', 'curl https://raw.githubusercontent.com/koush/scrypted/main/install/docker/install-intel-npu.sh | bash']); + const [exitCode] = await once(cp, 'exit'); + if (exitCode !== 0) + sdk.log.a('Failed to install intel-driver-compiler-npu.'); + else + needRestart = true; + } + } + catch (e) { + sdk.log.a('Failed to verify/install intel-driver-compiler-npu.'); + } + if (needRestart) sdk.log.a('A system update is pending. Please restart Scrypted to apply changes.'); }