Skip to content

Commit

Permalink
core: fix level-zero install check
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Sep 12, 2024
1 parent bd03933 commit 96a4a11
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plugins/core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/core",
"version": "0.3.72",
"version": "0.3.73",
"description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.",
"author": "Scrypted",
"license": "Apache-2.0",
Expand Down
6 changes: 3 additions & 3 deletions plugins/core/src/platform/lxc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function checkLxcDependencies() {
}

try {
const output = await new Promise<string>((r, f) => child_process.exec("sh -c 'apt show versions level-zero'", (err, stdout, stderr) => {
const output = await new Promise<string>((r, f) => child_process.exec("sh -c 'apt list --installed | grep level-zero/'", (err, stdout, stderr) => {
if (err && !stdout && !stderr)
f(err);
else
Expand All @@ -54,7 +54,7 @@ export async function checkLxcDependencies() {
if (cpuModel.includes('Core') && cpuModel.includes('Ultra')) {
if (
// apt
output.includes('No packages found')
output.includes('level-zero/')
) {
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');
Expand All @@ -69,7 +69,7 @@ export async function checkLxcDependencies() {
// so ensure it is not installed if this is not a core ultra system with npu.
if (
// apt
!output.includes('No packages found')
!output.includes('level-zero/')
) {
const cp = child_process.spawn('apt', ['-y', 'remove', 'level-zero']);
const [exitCode] = await once(cp, 'exit');
Expand Down

0 comments on commit 96a4a11

Please sign in to comment.