mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 09:33:10 -07:00
fix #2 for cuda detection: cuda_version is not a queryable param
This commit is contained in:
parent
88a027492a
commit
2bf3ca7747
3 changed files with 9 additions and 14 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "gerbil",
|
"name": "gerbil",
|
||||||
"productName": "Gerbil",
|
"productName": "Gerbil",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"description": "Run Large Language Models locally",
|
"description": "Run Large Language Models locally",
|
||||||
"main": "out/main/index.js",
|
"main": "out/main/index.js",
|
||||||
"homepage": "./",
|
"homepage": "./",
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
"@typescript-eslint/parser": "^8.46.2",
|
"@typescript-eslint/parser": "^8.46.2",
|
||||||
"@vitejs/plugin-react": "^5.0.4",
|
"@vitejs/plugin-react": "^5.0.4",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
"electron": "^38.3.0",
|
"electron": "^38.4.0",
|
||||||
"electron-builder": "^26.0.12",
|
"electron-builder": "^26.0.12",
|
||||||
"electron-vite": "^4.0.1",
|
"electron-vite": "^4.0.1",
|
||||||
"eslint": "^9.38.0",
|
"eslint": "^9.38.0",
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ async function detectCUDA() {
|
||||||
try {
|
try {
|
||||||
const { stdout } = await execa(
|
const { stdout } = await execa(
|
||||||
'nvidia-smi',
|
'nvidia-smi',
|
||||||
['--query-gpu=name,driver_version,cuda_version', '--format=csv,noheader'],
|
['--query-gpu=name,driver_version', '--format=csv,noheader'],
|
||||||
COMMON_EXEC_OPTIONS
|
COMMON_EXEC_OPTIONS
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -152,24 +152,19 @@ async function detectCUDA() {
|
||||||
const lines = stdout.split('\n').filter((line) => line.trim());
|
const lines = stdout.split('\n').filter((line) => line.trim());
|
||||||
const devices: string[] = [];
|
const devices: string[] = [];
|
||||||
let driverVersion: string | undefined;
|
let driverVersion: string | undefined;
|
||||||
let cudaVersion: string | undefined;
|
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
const [name, driver, cuda] = line.split(',').map((s) => s.trim());
|
const [name, driver] = line.split(',').map((s) => s.trim());
|
||||||
if (name) {
|
if (name) {
|
||||||
devices.push(formatDeviceName(name));
|
devices.push(formatDeviceName(name));
|
||||||
}
|
}
|
||||||
if (driver && !driverVersion) {
|
if (driver && !driverVersion) {
|
||||||
driverVersion = driver;
|
driverVersion = driver;
|
||||||
}
|
}
|
||||||
if (cuda && !cudaVersion) {
|
|
||||||
cudaVersion = cuda;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
devices,
|
devices,
|
||||||
version: cudaVersion,
|
|
||||||
driverVersion,
|
driverVersion,
|
||||||
} as const;
|
} as const;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
yarn.lock
10
yarn.lock
|
|
@ -2804,16 +2804,16 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"electron@npm:^38.3.0":
|
"electron@npm:^38.4.0":
|
||||||
version: 38.3.0
|
version: 38.4.0
|
||||||
resolution: "electron@npm:38.3.0"
|
resolution: "electron@npm:38.4.0"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get": "npm:^2.0.0"
|
"@electron/get": "npm:^2.0.0"
|
||||||
"@types/node": "npm:^22.7.7"
|
"@types/node": "npm:^22.7.7"
|
||||||
extract-zip: "npm:^2.0.1"
|
extract-zip: "npm:^2.0.1"
|
||||||
bin:
|
bin:
|
||||||
electron: cli.js
|
electron: cli.js
|
||||||
checksum: 10c0/5a8b9e6b8fc33a860ca1185bec42f2f2536107a075a78a4de1b1369ba3e995597ad9f73fdadf331863febc4d5748b9fc2b4fd834beff5317a2e75125f9ee3dd8
|
checksum: 10c0/3458409151d12f1fcd5e95374aa36e0d2f4aa0d3421c9f57dc521c606070294f33b24a681b3f93b49b02f4a3a07eb0070100ebda51b1198efd4b49dbf1260713
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|
@ -3761,7 +3761,7 @@ __metadata:
|
||||||
"@uiw/react-codemirror": "npm:^4.25.2"
|
"@uiw/react-codemirror": "npm:^4.25.2"
|
||||||
"@vitejs/plugin-react": "npm:^5.0.4"
|
"@vitejs/plugin-react": "npm:^5.0.4"
|
||||||
cross-env: "npm:^10.1.0"
|
cross-env: "npm:^10.1.0"
|
||||||
electron: "npm:^38.3.0"
|
electron: "npm:^38.4.0"
|
||||||
electron-builder: "npm:^26.0.12"
|
electron-builder: "npm:^26.0.12"
|
||||||
electron-updater: "npm:^6.6.2"
|
electron-updater: "npm:^6.6.2"
|
||||||
electron-vite: "npm:^4.0.1"
|
electron-vite: "npm:^4.0.1"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue