@nosana/node 1.1.91 → 1.1.92-rc

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.91",
3
+ "version": "1.1.92-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"
@@ -38,4 +38,4 @@ export interface JobRuntimeEnvSource extends JobRuntimeNodeSettings {
38
38
  * containers are run with. What the sidecar's own host adds (its container runtime, its GPUs)
39
39
  * is each environment's.
40
40
  */
41
- export declare function buildJobRuntimeEnv(source: JobRuntimeEnvSource): Record<string, string>;
41
+ export declare function buildJobRuntimeEnv(source: JobRuntimeEnvSource, nodeEnv?: NodeJS.ProcessEnv): Record<string, string>;
@@ -5,9 +5,10 @@ import { JOB_RUNTIME_PORT, } from '../../../../packages/job-runtime/src/host/ind
5
5
  * containers are run with. What the sidecar's own host adds (its container runtime, its GPUs)
6
6
  * is each environment's.
7
7
  */
8
- export function buildJobRuntimeEnv(source) {
8
+ export function buildJobRuntimeEnv(source, nodeEnv = process.env) {
9
9
  const { frp, rpc, consoleOutput } = source;
10
10
  return {
11
+ ...extraJobRuntimeEnv(nodeEnv),
11
12
  JOB_ADDRESS: source.jobAddress,
12
13
  JOB_KIND: source.kind,
13
14
  NODE_ADDRESS: source.nodeAddress,
@@ -23,3 +24,10 @@ export function buildJobRuntimeEnv(source) {
23
24
  ...(consoleOutput === 'entries' ? { JOB_RUNTIME_CONSOLE: 'entries', FORCE_COLOR: '1' } : {}),
24
25
  };
25
26
  }
27
+ const EXTRA_ENV_PREFIX = 'JOB_RUNTIME_ENV_';
28
+ /** The operator's own settings for the sidecar: `JOB_RUNTIME_ENV_<NAME>` on the node is `<NAME>`. */
29
+ function extraJobRuntimeEnv(nodeEnv) {
30
+ return Object.fromEntries(Object.entries(nodeEnv).flatMap(([key, value]) => key.startsWith(EXTRA_ENV_PREFIX) && value !== undefined
31
+ ? [[key.slice(EXTRA_ENV_PREFIX.length), value]]
32
+ : []));
33
+ }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.91",
3
+ "version": "1.1.92-rc",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@nosana/node",
9
- "version": "1.1.91",
9
+ "version": "1.1.92-rc",
10
10
  "license": "ISC",
11
11
  "workspaces": [
12
12
  "packages/*"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nosana/node",
3
- "version": "1.1.91",
3
+ "version": "1.1.92-rc",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "nosana-node": "./dist/src/index.js"