pinokiod 3.217.0 → 3.220.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.
@@ -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 cuda -c nvidia/label/cuda-12.1.0",
14
+ "conda install -y cuda -c nvidia/label/cuda-12.8.1",
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 cuda -c nvidia/label/cuda-12.1.0",
27
+ "conda install -y cuda -c nvidia/label/cuda-12.8.1",
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
- return this.kernel.bin.installed.conda.has("cudnn") &&
41
- this.kernel.bin.installed.conda.has("cuda") &&
42
- this.kernel.bin.installed.conda.has("libzlib-wapi")
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
- return this.kernel.bin.installed.conda.has("cudnn") &&
45
- this.kernel.bin.installed.conda.has("cuda")
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
- return this.kernel.bin.installed.conda.has("huggingface_hub")
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.217.0",
3
+ "version": "3.220.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {