pinokiod 3.217.0 → 3.221.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/bin/cuda.js +26 -7
- package/kernel/bin/huggingface.js +16 -2
- package/package.json +1 -1
package/kernel/bin/cuda.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const semver = require('semver')
|
|
1
2
|
class Cuda {
|
|
2
3
|
async install(req, ondata) {
|
|
3
4
|
if (this.kernel.platform === "win32") {
|
|
@@ -10,7 +11,7 @@ class Cuda {
|
|
|
10
11
|
await this.kernel.bin.exec({
|
|
11
12
|
message: [
|
|
12
13
|
"conda clean -y --all",
|
|
13
|
-
"conda install -y
|
|
14
|
+
"conda install -y nvidia/label/cuda-12.8.1::cuda"
|
|
14
15
|
]
|
|
15
16
|
}, ondata)
|
|
16
17
|
} else {
|
|
@@ -23,7 +24,7 @@ class Cuda {
|
|
|
23
24
|
await this.kernel.bin.exec({
|
|
24
25
|
message: [
|
|
25
26
|
"conda clean -y --all",
|
|
26
|
-
"conda install -y
|
|
27
|
+
"conda install -y nvidia/label/cuda-12.8.1::cuda"
|
|
27
28
|
]
|
|
28
29
|
}, ondata)
|
|
29
30
|
if (this.kernel.platform === "linux") {
|
|
@@ -37,13 +38,31 @@ class Cuda {
|
|
|
37
38
|
}
|
|
38
39
|
async installed() {
|
|
39
40
|
if (this.kernel.platform === 'win32') {
|
|
40
|
-
|
|
41
|
-
this.kernel.bin.installed.
|
|
42
|
-
|
|
41
|
+
if (this.kernel.bin.installed.conda.has("cudnn") && this.kernel.bin.installed.conda.has("cuda") && this.kernel.bin.installed.conda.has("libzlib-wapi")) {
|
|
42
|
+
let version = this.kernel.bin.installed.conda_versions.cuda
|
|
43
|
+
if (version) {
|
|
44
|
+
let coerced = semver.coerce(version)
|
|
45
|
+
console.log("cuda version", coerced)
|
|
46
|
+
if (semver.satisfies(coerced, ">=12.8.1")) {
|
|
47
|
+
console.log("cuda satisfied")
|
|
48
|
+
return true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
43
52
|
} else {
|
|
44
|
-
|
|
45
|
-
this.kernel.bin.installed.
|
|
53
|
+
if (this.kernel.bin.installed.conda.has("cudnn") && this.kernel.bin.installed.conda.has("cuda")) {
|
|
54
|
+
let version = this.kernel.bin.installed.conda_versions.cuda
|
|
55
|
+
if (version) {
|
|
56
|
+
let coerced = semver.coerce(version)
|
|
57
|
+
console.log("cuda version", coerced)
|
|
58
|
+
if (semver.satisfies(coerced, ">=12.8.1")) {
|
|
59
|
+
console.log("satisfied")
|
|
60
|
+
return true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
46
64
|
}
|
|
65
|
+
return false
|
|
47
66
|
}
|
|
48
67
|
env() {
|
|
49
68
|
return {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
const semver = require('semver')
|
|
1
2
|
class Huggingface {
|
|
2
3
|
cmd() {
|
|
3
|
-
return 'huggingface_hub "hf-xet!=1.1.10"'
|
|
4
|
+
//return 'huggingface_hub "hf-xet!=1.1.10"'
|
|
5
|
+
return 'huggingface_hub=1.0.1'
|
|
4
6
|
}
|
|
5
7
|
async install(req, ondata) {
|
|
6
8
|
await this.kernel.bin.exec({
|
|
@@ -11,7 +13,19 @@ class Huggingface {
|
|
|
11
13
|
}, ondata)
|
|
12
14
|
}
|
|
13
15
|
async installed() {
|
|
14
|
-
|
|
16
|
+
console.log(">> conda versions", this.kernel.bin.installed.conda_versions)
|
|
17
|
+
if (this.kernel.bin.installed.conda.has("huggingface_hub")) {
|
|
18
|
+
let version = this.kernel.bin.installed.conda_versions.huggingface_hub
|
|
19
|
+
if (version) {
|
|
20
|
+
let coerced = semver.coerce(version)
|
|
21
|
+
console.log("huggingface-cli version", coerced)
|
|
22
|
+
if (semver.satisfies(coerced, ">=1.0.1")) {
|
|
23
|
+
console.log("huggingface-cli version satisfied")
|
|
24
|
+
return true
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return false
|
|
15
29
|
}
|
|
16
30
|
// env() {
|
|
17
31
|
// return {
|