pinokiod 3.2.117 → 3.2.119

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.
@@ -131,6 +131,13 @@ conda-libmamba-solver=24.11.1`)
131
131
  // - defaults
132
132
  //create_default_packages:
133
133
  // - python=3.10`)
134
+
135
+
136
+ // 1. right after installing conda==24.11.1, run conda update --all
137
+ // 2. The pinned file says conda-libmamba-solver=24.11.1
138
+ // 3. so after conda update --all, it should be conda-libmamba-solver=24.11.1
139
+
140
+
134
141
  let cmds = [
135
142
  //"conda clean -y --index-cache",
136
143
  "conda clean -y --all",
@@ -139,6 +146,7 @@ conda-libmamba-solver=24.11.1`)
139
146
  `conda config --file ${this.kernel.path('condarc')} --set remote_max_retries 6`,
140
147
  `conda config --file ${this.kernel.path('condarc')} --set repodata_threads 4`,
141
148
  `conda config --file ${this.kernel.path('condarc')} --set fetch_threads 5`,
149
+ "conda install -y -c conda-forge conda-libmamba-solver=24.11.1",
142
150
  // "conda install libsqlite --force-reinstall -y",
143
151
  // `conda config --file ${this.kernel.path('condarc')} --set auto_update_conda False`,
144
152
  //"conda install -y conda=24.9.0 -vvv --strict-channel-priority",
@@ -22,6 +22,7 @@ const Torch = require("./torch")
22
22
  const { glob } = require('glob')
23
23
  const fakeUa = require('fake-useragent');
24
24
  const fse = require('fs-extra')
25
+ const semver = require('semver')
25
26
 
26
27
 
27
28
  //const Puppet = require("./puppeteer")
@@ -276,12 +277,25 @@ class Bin {
276
277
  conda_check.conda = true
277
278
  }
278
279
  }
279
- // if (name === "conda-libmamba-solver") {
280
- // //if (String(version) === "24.7.0") {
281
- // if (String(version) === "24.11.1") {
282
- // conda_check.mamba = true
283
- // }
284
- // }
280
+ if (name === "conda-libmamba-solver") {
281
+ //if (String(version) === "24.7.0") {
282
+ let channel = chunks[3]
283
+ console.log({ name, channel, version })
284
+ if (String(version) === "24.11.1" && channel === "conda-forge") {
285
+ conda_check.mamba = true
286
+ }
287
+ }
288
+ if (name === "sqlite") {
289
+ let coerced = semver.coerce(version)
290
+ let sqlite_requirement = ">=3.47.2"
291
+ console.log({ coerced, version, sqlite_requirement })
292
+ if (semver.satisfies(coerced, sqlite_requirement)) {
293
+ console.log("semver satisfied")
294
+ conda_check.sqlite = true
295
+ } else {
296
+ console.log("semver NOT satisfied")
297
+ }
298
+ }
285
299
  }
286
300
  } else {
287
301
  if (/name.*version.*build.*channel/i.test(line)) {
@@ -292,8 +306,8 @@ class Bin {
292
306
  }
293
307
 
294
308
  console.log({ conda_check })
295
- //if (conda_check.conda && conda_check.mamba) {
296
- if (conda_check.conda) {
309
+ if (conda_check.conda && conda_check.mamba && conda_check.sqlite) {
310
+ //if (conda_check.conda) {
297
311
  this.correct_conda = true
298
312
  }
299
313
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.2.117",
3
+ "version": "3.2.119",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2124,23 +2124,34 @@ class Server {
2124
2124
  } else {
2125
2125
  // update the py module if it's already installed
2126
2126
  console.log("not up to date")
2127
- let installed = await this.kernel.bin.mod.py.installed()
2128
- console.log("py installed", installed)
2129
- if (installed) {
2130
- // update
2131
- console.log("update py")
2132
- await this.kernel.exec({
2133
- message: "git pull",
2134
- path: this.kernel.path("bin/py")
2135
- }, (e) => {
2136
- console.log(e)
2137
- })
2138
-
2139
- }
2140
- // after updating, set the version
2141
- console.log("set the version", this.version.pinokiod)
2142
- this.kernel.store.set("version", this.version.pinokiod)
2143
- console.log("RESTART")
2127
+ await new Promise((resolve, reject) => {
2128
+ let interval = setInterval(async () => {
2129
+ console.log("checking mod.py")
2130
+ if (this.kernel.bin.mod && this.kernel.bin.mod.py) {
2131
+ console.log("mod.py initialized!")
2132
+ let installed = await this.kernel.bin.mod.py.installed()
2133
+ console.log("py installed", installed)
2134
+ if (installed) {
2135
+ // update
2136
+ console.log("update py")
2137
+ await this.kernel.exec({
2138
+ message: "git pull",
2139
+ path: this.kernel.path("bin/py")
2140
+ }, (e) => {
2141
+ console.log(e)
2142
+ })
2143
+ }
2144
+ // after updating, set the version
2145
+ console.log("set the version", this.version.pinokiod)
2146
+ this.kernel.store.set("version", this.version.pinokiod)
2147
+ console.log("RESTART")
2148
+ clearInterval(interval)
2149
+ resolve()
2150
+ } else {
2151
+ console.log("mod.py not initialized yet")
2152
+ }
2153
+ }, 1000)
2154
+ })
2144
2155
  this.listening = true // set this.listening = true so all http connections get reset when restarting
2145
2156
  await this.start(options)
2146
2157
  console.log("RESTARTED")