pinokiod 3.6.31 → 3.6.33

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.
@@ -567,8 +567,11 @@ class Api {
567
567
 
568
568
  }
569
569
  async step (request, rawrpc, input, i, total, args) {
570
+ console.log("####### step")
570
571
 
571
- await Promise.all([this.init, this.kernel.update_sysinfo])
572
+ console.time("STEP INIT")
573
+ await Promise.all([this.init(), this.kernel.update_sysinfo()])
574
+ console.timeEnd("STEP INIT")
572
575
 
573
576
  // await this.init()
574
577
  //
package/kernel/index.js CHANGED
@@ -565,11 +565,14 @@ class Kernel {
565
565
  }
566
566
  })
567
567
  let ts2 = Date.now()
568
+ console.time(">>>> 6 api.init")
568
569
  await this.api.init()
570
+ console.timeEnd(">>>> 6 api.init")
569
571
 
570
572
  //await this.shell.init()
571
573
 
572
574
  if (this.homedir) {
575
+ console.time(">>>> 7 template.init")
573
576
  await this.template.init({
574
577
  kernel: this,
575
578
  system,
@@ -579,15 +582,20 @@ class Kernel {
579
582
  return this.api.get_proxy_url("/proxy", port)
580
583
  },
581
584
  })
585
+ console.timeEnd(">>>> 7 template.init")
582
586
  this.sys = new Sysinfo()
583
587
  console.time("sys init")
588
+ console.time(">>>> 8 sys.init")
584
589
  await this.sys.init(this)
590
+ console.timeEnd(">>>> 8 sys.init")
585
591
  console.timeEnd("sys init")
586
592
  let info = this.sys.info
587
593
 
588
594
  this.sysinfo = info
589
595
 
596
+ console.time(">>>> 9 getInfo")
590
597
  await this.getInfo()
598
+ console.timeEnd(">>>> 9 getInfo")
591
599
 
592
600
  await fs.promises.mkdir(this.path("logs"), { recursive: true }).catch((e) => { })
593
601
  await fs.promises.writeFile(this.path("logs/system.json"), JSON.stringify(this.i, null, 2))
@@ -668,6 +676,7 @@ class Kernel {
668
676
  try {
669
677
  await this.sys.refresh()
670
678
  let info = this.sys.info
679
+ console.log({ info })
671
680
  this.template.update(info)
672
681
  this.sysinfo = info
673
682
  this.gpu = info.gpu
package/kernel/shell.js CHANGED
@@ -120,6 +120,7 @@ class Shell {
120
120
 
121
121
  this.env.CMAKE_OBJECT_PATH_MAX = 1024
122
122
  this.env.PYTORCH_ENABLE_MPS_FALLBACK = 1
123
+ this.env.TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD = 1
123
124
  // this.env.PIP_REQUIRE_VIRTUALENV = "true"
124
125
  // this.env.NPM_CONFIG_USERCONFIG = this.kernel.path("user_npmrc")
125
126
  // this.env.NPM_CONFIG_GLOBALCONFIG = this.kernel.path("global_npmrc")
package/kernel/sysinfo.js CHANGED
@@ -5,12 +5,12 @@ class Sysinfo {
5
5
  async init(kernel) {
6
6
  this.kernel = kernel
7
7
  this.info = {}
8
- await Promise.all([this.static, this.refresh])
8
+ await Promise.all([this.static(), this.refresh()])
9
9
  // await this.static()
10
10
  // await this.refresh()
11
11
  }
12
12
  async static() {
13
- await Promise.all([this.gpus, this.system, this.cpu, this.os, this.audio, this.env])
13
+ await Promise.all([this.gpus(), this.system(), this.cpu(), this.os(), this.audio(), this.env()])
14
14
  // await this.gpus()
15
15
  // await this.system()
16
16
  // await this.cpu()
@@ -25,17 +25,18 @@ class Sysinfo {
25
25
  // await this.time()
26
26
 
27
27
 
28
- await Promise.all([this.memory, this.battery, this.proc, this.bluetooth])
28
+ await Promise.all([this.memory(), this.battery(), this.proc(), this.bluetooth()])
29
29
  // await this.memory()
30
30
  // await this.battery()
31
31
  // await this.proc()
32
32
  // await this.bluetooth()
33
- //
33
+
34
34
 
35
35
 
36
36
  // await this.net()
37
37
  }
38
38
  async gpus() {
39
+ console.log("SYSINFO GPUS")
39
40
  let g = await system.graphics()
40
41
  let gpus
41
42
  if (g && g.controllers && g.controllers.length > 0) {
@@ -75,6 +76,7 @@ class Sysinfo {
75
76
  this.info.gpus = gpus
76
77
  this.info.gpu = gpu
77
78
  this.info.gpu_model = gpu_model
79
+ console.log("> this.info", this.info)
78
80
 
79
81
  }
80
82
  // async time() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.6.31",
3
+ "version": "3.6.33",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -899,6 +899,7 @@ class Server {
899
899
  let install_required = true
900
900
  if (!requirements_pending) {
901
901
  install_required = false
902
+ console.time(">>>>>>>>>> 1")
902
903
  for(let i=0; i<requirements.length; i++) {
903
904
  let r = requirements[i]
904
905
 
@@ -912,6 +913,7 @@ class Server {
912
913
  }
913
914
  }
914
915
  }
916
+ console.timeEnd(">>>>>>>>>> 1")
915
917
  }
916
918
 
917
919
  let error = null
@@ -2053,11 +2055,13 @@ class Server {
2053
2055
  }
2054
2056
  }
2055
2057
  async start(options) {
2058
+ console.time("SERVER START")
2056
2059
  this.debug = false
2057
2060
  if (options) {
2058
2061
  this.debug = options.debug
2059
2062
  this.browser = options.browser
2060
2063
  }
2064
+ console.time(">>>> 1")
2061
2065
 
2062
2066
  if (this.listening) {
2063
2067
  // stop proxies
@@ -2084,10 +2088,14 @@ class Server {
2084
2088
  // } catch (e) {
2085
2089
  // }
2086
2090
  }
2091
+ console.timeEnd(">>>> 1")
2087
2092
 
2088
2093
  // configure from kernel.store
2094
+ console.time(">>>> 2")
2089
2095
  await this.syncConfig()
2096
+ console.timeEnd(">>>> 2")
2090
2097
 
2098
+ console.time(">>>> 3")
2091
2099
  try {
2092
2100
  let _home = this.kernel.store.get("home")
2093
2101
  console.log({ _home })
@@ -2097,6 +2105,7 @@ class Server {
2097
2105
  } catch (e) {
2098
2106
  console.log("start logging attempt", e)
2099
2107
  }
2108
+ console.timeEnd(">>>> 3")
2100
2109
 
2101
2110
  // determine port if port is not passed in
2102
2111
 
@@ -2153,12 +2162,16 @@ class Server {
2153
2162
  }
2154
2163
 
2155
2164
  // initialize kernel
2165
+ console.time(">>>> 4 kernel.init")
2156
2166
  await this.kernel.init({ port: this.port})
2167
+ console.timeEnd(">>>> 4 kernel.init")
2157
2168
 
2169
+ console.time(">>>> 5 kernel.initHome")
2158
2170
  console.log({ needInitHome })
2159
2171
  if (needInitHome) {
2160
2172
  await this.kernel.initHome()
2161
2173
  }
2174
+ console.timeEnd(">>>> 5 kernel.initHome")
2162
2175
 
2163
2176
  if (this.kernel.homedir) {
2164
2177
  let ex = await this.kernel.exists(this.kernel.homedir, "ENVIRONMENT")
@@ -3430,6 +3443,7 @@ class Server {
3430
3443
  server: this.listening
3431
3444
  });
3432
3445
  })
3446
+ console.timeEnd("SERVER START")
3433
3447
 
3434
3448
  }
3435
3449
  }
package/server/socket.js CHANGED
@@ -16,6 +16,7 @@ class Socket {
16
16
  });
17
17
  });
18
18
  ws.on('message', async (message) => {
19
+ console.log("MESSAGE", message)
19
20
  const req = JSON.parse(message);
20
21
  if (req.response) {
21
22
  this.parent.kernel.api.respond(req)