dsh-plugin-local-infer 0.1.3 → 0.1.4
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/README.md +22 -4
- package/cordis.patch.yml +7 -0
- package/docs/zh/README.md +14 -2
- package/dsh/client.js +4195 -4522
- package/package.json +28 -11
- package/packages/core/lib/adapter.d.ts +133 -9
- package/packages/core/lib/adapter.js +74 -1
- package/packages/core/lib/config.d.ts +1 -1
- package/packages/core/lib/config.js +1 -1
- package/packages/core/lib/debug.d.ts +1 -1
- package/packages/core/lib/debug.js +1 -1
- package/packages/core/lib/defaults.d.ts +1 -1
- package/packages/core/lib/defaults.js +1 -1
- package/packages/core/lib/deps.d.ts +44 -17
- package/packages/core/lib/deps.js +24 -8
- package/packages/core/lib/estimator.d.ts +1 -1
- package/packages/core/lib/estimator.js +1 -1
- package/packages/core/lib/guideline.d.ts +1 -1
- package/packages/core/lib/guideline.js +1 -1
- package/packages/core/lib/hardware.d.ts +1 -1
- package/packages/core/lib/hardware.js +1 -1
- package/packages/core/lib/hf-cache.d.ts +70 -0
- package/packages/core/lib/hf-cache.js +83 -0
- package/packages/core/lib/index.d.ts +16 -9
- package/packages/core/lib/index.js +10 -6
- package/packages/core/lib/infer-cache.d.ts +39 -0
- package/packages/core/lib/infer-cache.js +53 -0
- package/packages/core/lib/launch-command.d.ts +8 -4
- package/packages/core/lib/launch-command.js +13 -6
- package/packages/core/lib/launch-record.d.ts +1 -1
- package/packages/core/lib/launch-record.js +1 -1
- package/packages/core/lib/logs.d.ts +8 -1
- package/packages/core/lib/logs.js +12 -4
- package/packages/core/lib/models.d.ts +120 -14
- package/packages/core/lib/models.js +209 -17
- package/packages/core/lib/parameter.d.ts +31 -3
- package/packages/core/lib/parameter.js +1 -1
- package/packages/core/lib/progress.d.ts +54 -0
- package/packages/core/lib/progress.js +120 -0
- package/packages/core/lib/registrar.d.ts +20 -9
- package/packages/core/lib/registrar.js +27 -7
- package/packages/core/lib/reserve.d.ts +11 -3
- package/packages/core/lib/reserve.js +6 -4
- package/packages/core/lib/status.d.ts +12 -6
- package/packages/core/lib/status.js +21 -10
- package/packages/core/lib/sudo.d.ts +80 -0
- package/packages/core/lib/sudo.js +78 -0
- package/packages/core/package.json +1 -1
- package/packages/orchestrator/lib/config.d.ts +63 -0
- package/packages/orchestrator/lib/config.js +111 -0
- package/packages/orchestrator/lib/index.d.ts +51 -0
- package/packages/orchestrator/lib/index.js +73 -0
- package/packages/orchestrator/lib/route.d.ts +60 -0
- package/packages/orchestrator/lib/route.js +159 -0
- package/packages/orchestrator/locale/en.json +6 -0
- package/packages/orchestrator/package.json +39 -0
- package/packages/orchestrator/prompt.md +87 -0
- package/packages/providers/lib/acquire.d.ts +92 -14
- package/packages/providers/lib/acquire.js +215 -37
- package/packages/providers/lib/adapters.d.ts +136 -12
- package/packages/providers/lib/adapters.js +597 -70
- package/packages/providers/lib/debug.d.ts +1 -1
- package/packages/providers/lib/debug.js +1 -1
- package/packages/providers/lib/deps.d.ts +27 -230
- package/packages/providers/lib/deps.js +61 -214
- package/packages/providers/lib/engines/basalt/basalt.d.ts +130 -0
- package/packages/providers/lib/engines/basalt/basalt.js +304 -0
- package/packages/providers/lib/engines/basalt/basaltAdapter.d.ts +85 -0
- package/packages/providers/lib/engines/basalt/basaltAdapter.js +439 -0
- package/packages/providers/lib/engines/basalt/basaltLinux.d.ts +23 -0
- package/packages/providers/lib/engines/basalt/basaltLinux.js +47 -0
- package/packages/providers/lib/engines/basalt/basaltMacOS.d.ts +17 -0
- package/packages/providers/lib/engines/basalt/basaltMacOS.js +19 -0
- package/packages/providers/lib/engines/basalt/basaltWindows.d.ts +24 -0
- package/packages/providers/lib/engines/basalt/basaltWindows.js +49 -0
- package/packages/providers/lib/engines/engineOs.d.ts +24 -0
- package/packages/providers/lib/engines/engineOs.js +17 -0
- package/packages/providers/lib/engines/{hyperqwen.d.ts → hyperqwen/hyperqwen.d.ts} +2 -2
- package/packages/providers/lib/engines/{hyperqwen.js → hyperqwen/hyperqwen.js} +14 -2
- package/packages/providers/lib/engines/{hyperqwenAdapter.d.ts → hyperqwen/hyperqwenAdapter.d.ts} +6 -6
- package/packages/providers/lib/engines/{hyperqwenAdapter.js → hyperqwen/hyperqwenAdapter.js} +24 -14
- package/packages/providers/lib/engines/hyperqwen/hyperqwenArch.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenArch.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenDebian.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenDebian.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenFedora.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenFedora.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenLinux.d.ts +10 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenLinux.js +14 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenMacOS.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenMacOS.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenWindows.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenWindows.js +9 -0
- package/packages/providers/lib/engines/{infernix.d.ts → infernix/infernix.d.ts} +7 -4
- package/packages/providers/lib/engines/{infernix.js → infernix/infernix.js} +52 -7
- package/packages/providers/lib/engines/{infernixAdapter.d.ts → infernix/infernixAdapter.d.ts} +5 -6
- package/packages/providers/lib/engines/{infernixAdapter.js → infernix/infernixAdapter.js} +75 -42
- package/packages/providers/lib/engines/infernix/infernixArch.d.ts +9 -0
- package/packages/providers/lib/engines/infernix/infernixArch.js +9 -0
- package/packages/providers/lib/engines/infernix/infernixDebian.d.ts +9 -0
- package/packages/providers/lib/engines/infernix/infernixDebian.js +9 -0
- package/packages/providers/lib/engines/infernix/infernixFedora.d.ts +9 -0
- package/packages/providers/lib/engines/infernix/infernixFedora.js +9 -0
- package/packages/providers/lib/engines/infernix/infernixLinux.d.ts +17 -0
- package/packages/providers/lib/engines/infernix/infernixLinux.js +35 -0
- package/packages/providers/lib/engines/infernix/infernixMacOS.d.ts +16 -0
- package/packages/providers/lib/engines/infernix/infernixMacOS.js +18 -0
- package/packages/providers/lib/engines/infernix/infernixWindows.d.ts +16 -0
- package/packages/providers/lib/engines/infernix/infernixWindows.js +34 -0
- package/packages/providers/lib/engines/{llamacpp.d.ts → llamacpp/llamacpp.d.ts} +2 -2
- package/packages/providers/lib/engines/{llamacpp.js → llamacpp/llamacpp.js} +12 -2
- package/packages/providers/lib/engines/{llamacppAdapter.d.ts → llamacpp/llamacppAdapter.d.ts} +5 -6
- package/packages/providers/lib/engines/{llamacppAdapter.js → llamacpp/llamacppAdapter.js} +87 -45
- package/packages/providers/lib/engines/llamacpp/llamacppArch.d.ts +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppArch.js +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppDebian.d.ts +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppDebian.js +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppFedora.d.ts +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppFedora.js +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppLinux.d.ts +17 -0
- package/packages/providers/lib/engines/llamacpp/llamacppLinux.js +28 -0
- package/packages/providers/lib/engines/llamacpp/llamacppMacOS.d.ts +15 -0
- package/packages/providers/lib/engines/llamacpp/llamacppMacOS.js +17 -0
- package/packages/providers/lib/engines/llamacpp/llamacppWindows.d.ts +15 -0
- package/packages/providers/lib/engines/llamacpp/llamacppWindows.js +26 -0
- package/packages/providers/lib/engines/{ninfer.d.ts → ninfer/ninfer.d.ts} +2 -2
- package/packages/providers/lib/engines/{ninfer.js → ninfer/ninfer.js} +24 -2
- package/packages/providers/lib/engines/{ninferAdapter.d.ts → ninfer/ninferAdapter.d.ts} +5 -6
- package/packages/providers/lib/engines/{ninferAdapter.js → ninfer/ninferAdapter.js} +123 -55
- package/packages/providers/lib/engines/ninfer/ninferArch.d.ts +9 -0
- package/packages/providers/lib/engines/ninfer/ninferArch.js +9 -0
- package/packages/providers/lib/engines/ninfer/ninferDebian.d.ts +9 -0
- package/packages/providers/lib/engines/ninfer/ninferDebian.js +9 -0
- package/packages/providers/lib/engines/ninfer/ninferFedora.d.ts +9 -0
- package/packages/providers/lib/engines/ninfer/ninferFedora.js +9 -0
- package/packages/providers/lib/engines/ninfer/ninferLinux.d.ts +17 -0
- package/packages/providers/lib/engines/ninfer/ninferLinux.js +37 -0
- package/packages/providers/lib/engines/ninfer/ninferMacOS.d.ts +15 -0
- package/packages/providers/lib/engines/ninfer/ninferMacOS.js +17 -0
- package/packages/providers/lib/engines/ninfer/ninferWindows.d.ts +29 -0
- package/packages/providers/lib/engines/ninfer/ninferWindows.js +59 -0
- package/packages/providers/lib/engines/strata/strata.d.ts +1 -0
- package/packages/providers/lib/engines/{strata.js → strata/strata.js} +70 -3
- package/packages/providers/lib/engines/{strataAdapter.d.ts → strata/strataAdapter.d.ts} +5 -6
- package/packages/providers/lib/engines/{strataAdapter.js → strata/strataAdapter.js} +147 -111
- package/packages/providers/lib/engines/strata/strataArch.d.ts +9 -0
- package/packages/providers/lib/engines/strata/strataArch.js +9 -0
- package/packages/providers/lib/engines/strata/strataDebian.d.ts +9 -0
- package/packages/providers/lib/engines/strata/strataDebian.js +9 -0
- package/packages/providers/lib/engines/strata/strataFedora.d.ts +9 -0
- package/packages/providers/lib/engines/strata/strataFedora.js +9 -0
- package/packages/providers/lib/engines/strata/strataLinux.d.ts +21 -0
- package/packages/providers/lib/engines/strata/strataLinux.js +30 -0
- package/packages/providers/lib/engines/strata/strataMacOS.d.ts +16 -0
- package/packages/providers/lib/engines/strata/strataMacOS.js +17 -0
- package/packages/providers/lib/engines/strata/strataWindows.d.ts +27 -0
- package/packages/providers/lib/engines/strata/strataWindows.js +37 -0
- package/packages/providers/lib/engines.d.ts +7 -5
- package/packages/providers/lib/engines.js +21 -10
- package/packages/providers/lib/guidelines.d.ts +5 -4
- package/packages/providers/lib/guidelines.js +18 -5
- package/packages/providers/lib/index.d.ts +33 -29
- package/packages/providers/lib/index.js +45 -33
- package/packages/providers/lib/model-defaults.d.ts +5 -1
- package/packages/providers/lib/model-defaults.js +25 -1
- package/packages/providers/lib/platform.d.ts +8 -5
- package/packages/providers/lib/platform.js +23 -9
- package/packages/providers/lib/presets.d.ts +6 -4
- package/packages/providers/lib/presets.js +53 -5
- package/packages/providers/lib/systemDeps.d.ts +313 -0
- package/packages/providers/lib/systemDeps.js +284 -0
- package/packages/providers/lib/vram.d.ts +34 -8
- package/packages/providers/lib/vram.js +81 -8
- package/packages/providers/package.json +2 -2
- package/packages/service/lib/index.d.ts +176 -21
- package/packages/service/lib/index.js +589 -86
- package/packages/service/lib/launch-target.d.ts +19 -0
- package/packages/service/lib/launch-target.js +28 -0
- package/packages/service/lib/run-logs.d.ts +72 -0
- package/packages/service/lib/run-logs.js +125 -0
- package/packages/service/lib/types.d.ts +163 -6
- package/packages/service/lib/types.js +1 -1
- package/packages/service/package.json +2 -2
- package/packages/tool/lib/index.d.ts +1 -1
- package/packages/tool/lib/index.js +1 -1
- package/packages/tool/package.json +2 -2
- package/packages/ui/lib/config.d.ts +12 -2
- package/packages/ui/lib/config.js +18 -2
- package/packages/ui/lib/deps.d.ts +1 -1
- package/packages/ui/lib/deps.js +1 -1
- package/packages/ui/lib/form.d.ts +1 -1
- package/packages/ui/lib/form.js +1 -1
- package/packages/ui/lib/index.d.ts +7 -1
- package/packages/ui/lib/index.js +12 -2
- package/packages/ui/lib/meter.d.ts +1 -1
- package/packages/ui/lib/meter.js +1 -1
- package/packages/ui/lib/ops/engine.d.ts +142 -34
- package/packages/ui/lib/ops/engine.js +469 -265
- package/packages/ui/lib/ops/get-steps.d.ts +98 -0
- package/packages/ui/lib/ops/get-steps.js +359 -0
- package/packages/ui/lib/ops/hf.d.ts +26 -11
- package/packages/ui/lib/ops/hf.js +115 -25
- package/packages/ui/lib/ops/logs.d.ts +70 -15
- package/packages/ui/lib/ops/logs.js +96 -35
- package/packages/ui/lib/ops/model.d.ts +2 -10
- package/packages/ui/lib/ops/model.js +9 -16
- package/packages/ui/lib/request.d.ts +1 -1
- package/packages/ui/lib/request.js +1 -1
- package/packages/ui/lib/route.d.ts +22 -6
- package/packages/ui/lib/route.js +32 -9
- package/packages/ui/lib/routes/chat-template.d.ts +1 -14
- package/packages/ui/lib/routes/chat-template.js +1 -37
- package/packages/ui/lib/routes/deps.d.ts +1 -16
- package/packages/ui/lib/routes/deps.js +1 -27
- package/packages/ui/lib/routes/download.d.ts +1 -16
- package/packages/ui/lib/routes/download.js +1 -48
- package/packages/ui/lib/routes/get.d.ts +1 -18
- package/packages/ui/lib/routes/get.js +66 -17
- package/packages/ui/lib/routes/install.d.ts +1 -1
- package/packages/ui/lib/routes/install.js +1 -1
- package/packages/ui/lib/routes/launch.d.ts +13 -7
- package/packages/ui/lib/routes/launch.js +33 -9
- package/packages/ui/lib/routes/logs.d.ts +57 -0
- package/packages/ui/lib/routes/logs.js +117 -0
- package/packages/ui/lib/routes/provider-delete.d.ts +1 -1
- package/packages/ui/lib/routes/provider-delete.js +1 -1
- package/packages/ui/lib/routes/register.d.ts +1 -1
- package/packages/ui/lib/routes/register.js +1 -1
- package/packages/ui/lib/routes/save.d.ts +1 -1
- package/packages/ui/lib/routes/save.js +22 -2
- package/packages/ui/lib/routes/stop.d.ts +7 -4
- package/packages/ui/lib/routes/stop.js +7 -4
- package/packages/ui/lib/routes/stream.d.ts +40 -0
- package/packages/ui/lib/routes/stream.js +68 -0
- package/packages/ui/lib/routes/summary.d.ts +1 -1
- package/packages/ui/lib/routes/summary.js +1 -1
- package/packages/ui/lib/routes/unregister.d.ts +1 -1
- package/packages/ui/lib/routes/unregister.js +1 -1
- package/packages/ui/lib/viewmodels/deps.d.ts +1 -31
- package/packages/ui/lib/viewmodels/deps.js +1 -89
- package/packages/ui/lib/viewmodels/depsHelpers.d.ts +1 -28
- package/packages/ui/lib/viewmodels/depsHelpers.js +72 -11
- package/packages/ui/lib/viewmodels/summary.d.ts +7 -2
- package/packages/ui/lib/viewmodels/summary.js +55 -35
- package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +1 -1
- package/packages/ui/lib/viewmodels/summaryHelpers.js +1 -1
- package/packages/ui/lib/warnings.d.ts +1 -1
- package/packages/ui/lib/warnings.js +1 -1
- package/packages/ui/package.json +4 -4
- package/packages/providers/lib/engines/strata.d.ts +0 -53
|
@@ -13,13 +13,16 @@
|
|
|
13
13
|
* queries the running engine's model endpoint through the terminal for the id
|
|
14
14
|
* it actually loaded (family and size sized to the host), so the registrar
|
|
15
15
|
* publishes the served model, not a placeholder.
|
|
16
|
-
* @module dsh-plugin-local-infer/providers/engines/strataAdapter
|
|
16
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataAdapter
|
|
17
17
|
*/
|
|
18
18
|
import { join } from 'node:path';
|
|
19
|
-
import { EngineAdapter } from '
|
|
20
|
-
import { customArgEnv, customArgFlags, delay, envFromSpecs, flagsFromSpecs, nodeLifecycleHost, trackChild, } from "
|
|
21
|
-
import {
|
|
22
|
-
import { STRATA_PARAMETERS, strataModelKey } from "./strata.js";
|
|
19
|
+
import { EngineAdapter, autoRebuildEnabled } from '../../../../core/lib/index.js';
|
|
20
|
+
import { HEALTH_POLL_DEFAULT_MS, HEALTH_POLL_MAX_ATTEMPTS, auditRun, customArgEnv, customArgFlags, delay, envFromSpecs, flagsFromSpecs, logHealthPoll, nodeLifecycleHost, stopProcessPlan, trackChild, } from "../../adapters.js";
|
|
21
|
+
import { syncEngineForDeploy } from "../../acquire.js";
|
|
22
|
+
import { STRATA_PARAMETERS, strataDefaults, strataModelKey, } from "./strata.js";
|
|
23
|
+
import { strataLinuxSourceLaunch } from "./strataLinux.js";
|
|
24
|
+
import { strataMacOSSourceLaunch } from "./strataMacOS.js";
|
|
25
|
+
import { strataWindowsSourceLaunch } from "./strataWindows.js";
|
|
23
26
|
/**
|
|
24
27
|
* The Strata docker image the adapter pulls and runs. The image is the
|
|
25
28
|
* upstream GitHub Container Registry artifact for the newest release's CUDA 13
|
|
@@ -34,6 +37,17 @@ export const STRATA_DOCKER_IMAGE = 'ghcr.io/niko1221/strata:latest-cuda13';
|
|
|
34
37
|
* docs/AI_SETUP.md step 2 (Linux and Mac; Windows uses the PowerShell twin).
|
|
35
38
|
*/
|
|
36
39
|
export const STRATA_BINARY_INSTALL = 'curl -fsSL https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh';
|
|
40
|
+
/**
|
|
41
|
+
* The source-build wrapper is OS-specific (setup.sh on Linux/Mac,
|
|
42
|
+
* START-HERE.bat on Windows), so the launch argv comes from the host OS's
|
|
43
|
+
* launch function. The adapter's renderLaunch reads this map by the hardware
|
|
44
|
+
* profile's os, keeping the per-OS command in its own OS file.
|
|
45
|
+
*/
|
|
46
|
+
const STRATA_SOURCE_LAUNCH = {
|
|
47
|
+
linux: strataLinuxSourceLaunch,
|
|
48
|
+
macos: strataMacOSSourceLaunch,
|
|
49
|
+
windows: strataWindowsSourceLaunch,
|
|
50
|
+
};
|
|
37
51
|
/**
|
|
38
52
|
* strataPreReadyState reads the phase the strata process is in from the tail of
|
|
39
53
|
* its accumulated output. The Terminal downloads the engine and the model files
|
|
@@ -201,6 +215,7 @@ export class StrataAdapter extends EngineAdapter {
|
|
|
201
215
|
...(modelId !== undefined ? { modelId } : {}),
|
|
202
216
|
port,
|
|
203
217
|
healthUrl: `http://127.0.0.1:${port}/health`,
|
|
218
|
+
os: _hw.os,
|
|
204
219
|
};
|
|
205
220
|
}
|
|
206
221
|
if (mode === 'binary') {
|
|
@@ -225,50 +240,48 @@ export class StrataAdapter extends EngineAdapter {
|
|
|
225
240
|
...(modelId !== undefined ? { modelId } : {}),
|
|
226
241
|
port,
|
|
227
242
|
healthUrl: `http://127.0.0.1:${port}/health`,
|
|
243
|
+
os: _hw.os,
|
|
228
244
|
};
|
|
229
245
|
}
|
|
230
|
-
// The source build: run
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
//
|
|
246
|
+
// The source build: run the OS wrapper (setup.sh on Linux/Mac,
|
|
247
|
+
// START-HERE.bat on Windows) with the model. It reuses the engine the Get
|
|
248
|
+
// step built (the acquisition build step), downloads the named model, and
|
|
249
|
+
// starts the engine. Running the wrapper (rather than a pre-written
|
|
250
|
+
// run-<model> start script) is model-aware and self-contained, so the
|
|
234
251
|
// launch does not depend on the build step having written a script for this
|
|
235
|
-
// exact model. The deploy step resolves
|
|
236
|
-
// checkout before spawning.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
//
|
|
241
|
-
//
|
|
242
|
-
const
|
|
252
|
+
// exact model. The deploy step resolves the wrapper to an absolute path in
|
|
253
|
+
// the checkout before spawning.
|
|
254
|
+
// The source-build wrapper is OS-specific (setup.sh on Linux/Mac,
|
|
255
|
+
// START-HERE.bat on Windows), so the argv comes from the host OS's launch
|
|
256
|
+
// function. The config reads (family, vision, context) are OS-agnostic and
|
|
257
|
+
// resolve their defaults from the parameter surface, so the defaults have
|
|
258
|
+
// one home.
|
|
259
|
+
const { family, vision, context } = strataDefaults(config);
|
|
260
|
+
const sourceLaunch = STRATA_SOURCE_LAUNCH[_hw.os];
|
|
243
261
|
return {
|
|
244
262
|
engineId: this.id,
|
|
245
263
|
kind: 'process',
|
|
246
|
-
argv:
|
|
247
|
-
'setup.sh',
|
|
248
|
-
'--yes',
|
|
249
|
-
...(model !== '' ? ['--model', model] : []),
|
|
250
|
-
...(family !== 'qwen' ? ['--family', family] : []),
|
|
251
|
-
'--vision',
|
|
252
|
-
visionFlag,
|
|
253
|
-
...(context !== undefined ? ['--context', context] : []),
|
|
254
|
-
'--port',
|
|
255
|
-
String(port),
|
|
256
|
-
...customArgs,
|
|
257
|
-
],
|
|
264
|
+
argv: sourceLaunch({ model, family, vision, context, port, customArgs }),
|
|
258
265
|
env: {},
|
|
259
266
|
...(modelId !== undefined ? { modelId } : {}),
|
|
260
267
|
port,
|
|
261
268
|
healthUrl: `http://127.0.0.1:${port}/health`,
|
|
269
|
+
os: _hw.os,
|
|
262
270
|
};
|
|
263
271
|
}
|
|
264
272
|
async deploy(plan, platform, onProgress, options) {
|
|
265
273
|
if (plan.kind === 'docker') {
|
|
266
|
-
//
|
|
267
|
-
//
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
274
|
+
// Auto Rebuild off (the card's checkbox): the image pull is skipped and
|
|
275
|
+
// the already-present image starts. The image pull is the docker build
|
|
276
|
+
// step: the card's button reads "Building..." for it, and its
|
|
277
|
+
// `$ <command>` line reaches the launch run's log sink before the child
|
|
278
|
+
// spawns.
|
|
279
|
+
if (autoRebuildEnabled(options?.autoRebuild)) {
|
|
280
|
+
onProgress?.('build');
|
|
281
|
+
const pull = await auditRun(this.host, `docker pull ${STRATA_DOCKER_IMAGE}`, options?.onLog);
|
|
282
|
+
if (!pull.ok) {
|
|
283
|
+
return { ok: false, detail: `docker pull failed: ${pull.detail ?? 'unknown'}` };
|
|
284
|
+
}
|
|
272
285
|
}
|
|
273
286
|
const handle = this.host.spawn(plan.argv ?? [], plan.env ?? {});
|
|
274
287
|
trackChild(this.children, this.planKey(plan), handle);
|
|
@@ -278,60 +291,61 @@ export class StrataAdapter extends EngineAdapter {
|
|
|
278
291
|
const engineDir = platform?.engineDirectory;
|
|
279
292
|
// The binary plan runs the strata command (on the PATH after the install
|
|
280
293
|
// script), so its build step is the one-line install. The source-build
|
|
281
|
-
// plan runs
|
|
282
|
-
// plus the engine's own
|
|
283
|
-
// launch resolves
|
|
294
|
+
// plan runs the OS wrapper in the checkout, so its build step is the git
|
|
295
|
+
// sync plus the engine's own wrapper (the acquisition build steps), and
|
|
296
|
+
// the launch resolves the wrapper to an absolute path in that checkout.
|
|
284
297
|
const isBinary = plan.argv?.[0] === 'strata';
|
|
285
298
|
let buildLogs = '';
|
|
286
299
|
if (isBinary) {
|
|
287
|
-
//
|
|
288
|
-
//
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
300
|
+
// Auto Rebuild off (the card's checkbox): the install is skipped and
|
|
301
|
+
// the already-installed strata command starts. The install script
|
|
302
|
+
// downloads the Terminal: the card's button reads "Downloading..."
|
|
303
|
+
// for it, and its `$ <command>` line reaches the launch run's log
|
|
304
|
+
// sink before the child spawns.
|
|
305
|
+
if (autoRebuildEnabled(options?.autoRebuild)) {
|
|
306
|
+
onProgress?.('download');
|
|
307
|
+
const install = await auditRun(this.host, STRATA_BINARY_INSTALL, options?.onLog);
|
|
308
|
+
if (!install.ok) {
|
|
309
|
+
return { ok: false, detail: `strata install failed: ${install.detail ?? 'unknown'}` };
|
|
310
|
+
}
|
|
293
311
|
}
|
|
294
312
|
}
|
|
295
313
|
else {
|
|
296
|
-
// The source build needs the checkout directory to resolve
|
|
297
|
-
// without it the launch cannot find the engine.
|
|
314
|
+
// The source build needs the checkout directory to resolve the OS
|
|
315
|
+
// wrapper; without it the launch cannot find the engine.
|
|
298
316
|
if (engineDir === undefined) {
|
|
299
317
|
return {
|
|
300
318
|
ok: false,
|
|
301
|
-
detail: 'the source build needs an engine directory (the Get step checkout) to run
|
|
319
|
+
detail: 'the source build needs an engine directory (the Get step checkout) to run the OS wrapper',
|
|
302
320
|
};
|
|
303
321
|
}
|
|
304
|
-
if (options?.autoRebuild
|
|
305
|
-
|
|
306
|
-
|
|
322
|
+
if (autoRebuildEnabled(options?.autoRebuild)) {
|
|
323
|
+
// The conditional rebuild fetches the checkout, prices it against the
|
|
324
|
+
// remote branch, and rebuilds only when it is behind (or a fresh
|
|
325
|
+
// clone). The decision, the build command, and its output are
|
|
326
|
+
// captured into buildLogs and threaded to the card's Logs section.
|
|
327
|
+
const sync = await syncEngineForDeploy(this.host, {
|
|
307
328
|
engineId: this.id,
|
|
308
329
|
directory: engineDir,
|
|
309
|
-
...(platform
|
|
310
|
-
...(options
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
buildLogs = sync.logs;
|
|
330
|
+
...(platform !== undefined ? { platform } : {}),
|
|
331
|
+
...(options !== undefined ? { options } : {}),
|
|
332
|
+
// The host OS the build steps pick for: a Windows host reads the
|
|
333
|
+
// engine's Windows build steps when the user carries no build-
|
|
334
|
+
// command override.
|
|
335
|
+
...(plan.os !== undefined ? { os: plan.os } : {}),
|
|
336
|
+
...(onProgress !== undefined ? { onProgress } : {}),
|
|
337
|
+
});
|
|
338
|
+
buildLogs = sync.buildLogs;
|
|
319
339
|
if (!sync.ok) {
|
|
320
340
|
return { ok: false, detail: sync.detail ?? 'unknown', logs: buildLogs };
|
|
321
341
|
}
|
|
322
|
-
// The build output reads as a fresh Logs section: a "Building..."
|
|
323
|
-
// separator leads the build decision and output, the same line the
|
|
324
|
-
// card writes when the build step event lands.
|
|
325
|
-
if (sync.rebuilt && buildLogs !== '') {
|
|
326
|
-
buildLogs = `--- Building...\n${buildLogs}`;
|
|
327
|
-
}
|
|
328
342
|
}
|
|
329
343
|
}
|
|
330
344
|
const withLogs = (result) => buildLogs !== '' ? { ...result, logs: buildLogs } : result;
|
|
331
|
-
// The source-build plan names
|
|
332
|
-
// it to an absolute path so spawn finds it (spawn resolves a bare
|
|
333
|
-
// against PATH, not the cwd). The binary plan's strata is on the
|
|
334
|
-
// it spawns as-is.
|
|
345
|
+
// The source-build plan names the OS wrapper relative to the checkout;
|
|
346
|
+
// resolve it to an absolute path so spawn finds it (spawn resolves a bare
|
|
347
|
+
// name against PATH, not the cwd). The binary plan's strata is on the
|
|
348
|
+
// PATH, so it spawns as-is.
|
|
335
349
|
const argv = plan.argv ?? [];
|
|
336
350
|
const spawnArgv = !isBinary && engineDir !== undefined
|
|
337
351
|
? [join(engineDir, argv[0] ?? 'setup.sh'), ...argv.slice(1)]
|
|
@@ -351,62 +365,85 @@ export class StrataAdapter extends EngineAdapter {
|
|
|
351
365
|
// reports the start phase: a 200 is ready, a process that ended before
|
|
352
366
|
// readiness is failed, and a process still fetching its files after the
|
|
353
367
|
// attempt cap is downloading (in progress, not a failure) so the card
|
|
354
|
-
// re-polls instead of showing a broken launch.
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
// A running tracked process reports its start phase from its output. A
|
|
365
|
-
// missing handle (no deploy tracked one, or the process already ended)
|
|
366
|
-
// falls through to the plain poll: the health URL stays down, so the
|
|
367
|
-
// loop times out and reads the start as failed.
|
|
368
|
+
// re-polls instead of showing a broken launch. The shared logHealthPoll
|
|
369
|
+
// wrap carries the URL-query rule (one `> GET` line ahead of the settled
|
|
370
|
+
// verdict, retries silent).
|
|
371
|
+
return logHealthPoll(options?.onLog, plan.healthUrl, async () => {
|
|
372
|
+
const pollMs = options?.pollMs ?? HEALTH_POLL_DEFAULT_MS;
|
|
373
|
+
const maxAttempts = options?.maxAttempts ?? HEALTH_POLL_MAX_ATTEMPTS;
|
|
374
|
+
// The tracked handle is read before the loop: trackChild drops the map
|
|
375
|
+
// entry when the child ends, so a late read would miss the exit state
|
|
376
|
+
// the early-exit check needs.
|
|
368
377
|
const handle = this.children.get(this.planKey(plan));
|
|
369
|
-
|
|
370
|
-
|
|
378
|
+
let last = { status: 0, ok: false };
|
|
379
|
+
let lastPreReady = null;
|
|
380
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
381
|
+
// The state read runs before the fetch: a child that settled (a crash,
|
|
382
|
+
// a pkill, or a spawn failure) will never report 200, so the poll
|
|
383
|
+
// ends here with a failed result instead of the full attempt cap.
|
|
384
|
+
if (handle?.hasExited?.() === true) {
|
|
385
|
+
return {
|
|
386
|
+
healthy: false,
|
|
387
|
+
status: last.status,
|
|
388
|
+
state: 'failed',
|
|
389
|
+
detail: 'the engine process exited before it reported ready',
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
last = await this.host.fetch(plan.healthUrl);
|
|
393
|
+
if (last.status === 200) {
|
|
394
|
+
return { healthy: true, status: 200, state: 'ready' };
|
|
395
|
+
}
|
|
396
|
+
// A running tracked process reports its start phase from its output. A
|
|
397
|
+
// missing handle (no deploy tracked one, or the process already ended)
|
|
398
|
+
// falls through to the plain poll: the health URL stays down, so the
|
|
399
|
+
// loop times out and reads the start as failed.
|
|
400
|
+
if (handle !== undefined) {
|
|
401
|
+
lastPreReady = strataPreReadyState(handle.logs ?? '');
|
|
402
|
+
}
|
|
403
|
+
if (pollMs > 0 && attempt < maxAttempts) {
|
|
404
|
+
await delay(pollMs);
|
|
405
|
+
}
|
|
371
406
|
}
|
|
372
|
-
|
|
373
|
-
|
|
407
|
+
// The engine did not report ready within the attempt cap. If it was still
|
|
408
|
+
// downloading its files, read the start as in progress (downloading): the
|
|
409
|
+
// download is not a broken launch, and the card re-polls until the engine
|
|
410
|
+
// reports ready. If the download was done and the engine was starting,
|
|
411
|
+
// read the start as failed (a stuck start timed out).
|
|
412
|
+
if (lastPreReady === 'downloading') {
|
|
413
|
+
return {
|
|
414
|
+
healthy: false,
|
|
415
|
+
status: last.status,
|
|
416
|
+
state: 'downloading',
|
|
417
|
+
detail: 'the engine is still downloading its model files',
|
|
418
|
+
};
|
|
374
419
|
}
|
|
375
|
-
}
|
|
376
|
-
// The engine did not report ready within the attempt cap. If it was still
|
|
377
|
-
// downloading its files, read the start as in progress (downloading): the
|
|
378
|
-
// download is not a broken launch, and the card re-polls until the engine
|
|
379
|
-
// reports ready. If the download was done and the engine was starting,
|
|
380
|
-
// read the start as failed (a stuck start timed out).
|
|
381
|
-
if (lastPreReady === 'downloading') {
|
|
382
420
|
return {
|
|
383
421
|
healthy: false,
|
|
384
422
|
status: last.status,
|
|
385
|
-
state: '
|
|
386
|
-
detail:
|
|
423
|
+
state: 'failed',
|
|
424
|
+
detail: `health check did not return 200 within ${maxAttempts} attempts`,
|
|
387
425
|
};
|
|
388
|
-
}
|
|
389
|
-
return {
|
|
390
|
-
healthy: false,
|
|
391
|
-
status: last.status,
|
|
392
|
-
state: 'failed',
|
|
393
|
-
detail: `health check did not return 200 within ${maxAttempts} attempts`,
|
|
394
|
-
};
|
|
426
|
+
});
|
|
395
427
|
}
|
|
396
|
-
async stop(plan) {
|
|
428
|
+
async stop(plan, log) {
|
|
397
429
|
if (plan.kind === 'docker' && plan.containerName !== undefined) {
|
|
398
|
-
await this.host
|
|
430
|
+
await auditRun(this.host, `docker stop ${plan.containerName}`, log);
|
|
399
431
|
}
|
|
400
432
|
// The binary plan stops through the strata command; the source-build plan
|
|
401
433
|
// has no strata command, so it stops by signalling the tracked process.
|
|
402
434
|
if (plan.kind === 'process' && plan.argv?.[0] === 'strata') {
|
|
403
|
-
await this.host
|
|
435
|
+
await auditRun(this.host, 'strata launch --stop', log);
|
|
404
436
|
}
|
|
405
437
|
const handle = this.children.get(this.planKey(plan));
|
|
406
438
|
if (handle !== undefined) {
|
|
407
439
|
handle.kill();
|
|
408
440
|
this.children.delete(this.planKey(plan));
|
|
441
|
+
return;
|
|
409
442
|
}
|
|
443
|
+
// No tracked child (an engine a DSH restart re-adopted): signal the pid
|
|
444
|
+
// the stored launch record stamped on the plan, so the stop reaches a
|
|
445
|
+
// process this adapter instance did not spawn.
|
|
446
|
+
await stopProcessPlan(this.host, plan, log);
|
|
410
447
|
}
|
|
411
448
|
buildMode(config) {
|
|
412
449
|
const mode = config.buildMode;
|
|
@@ -418,10 +455,9 @@ export class StrataAdapter extends EngineAdapter {
|
|
|
418
455
|
return 'binary';
|
|
419
456
|
}
|
|
420
457
|
port(config) {
|
|
458
|
+
// 8080 is the port the strata launch CLI binds by default, so a bare
|
|
459
|
+
// config launches on it.
|
|
421
460
|
return typeof config.port === 'number' ? config.port : 8080;
|
|
422
461
|
}
|
|
423
|
-
planKey(plan) {
|
|
424
|
-
return `${plan.engineId}:${plan.port}`;
|
|
425
|
-
}
|
|
426
462
|
}
|
|
427
|
-
//# sourceMappingURL=strataAdapter.js.map
|
|
463
|
+
//# sourceMappingURL=strataAdapter.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Arch Linux build profile. Arch builds Strata through the shared
|
|
3
|
+
* Linux route (the engine's own setup.sh), so this profile reuses the shared
|
|
4
|
+
* Linux profile and carries no build steps of its own.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataArch
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const STRATA_ARCH: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=strataArch.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Arch Linux build profile. Arch builds Strata through the shared
|
|
3
|
+
* Linux route (the engine's own setup.sh), so this profile reuses the shared
|
|
4
|
+
* Linux profile and carries no build steps of its own.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataArch
|
|
6
|
+
*/
|
|
7
|
+
import { STRATA_LINUX } from "./strataLinux.js";
|
|
8
|
+
export const STRATA_ARCH = STRATA_LINUX;
|
|
9
|
+
//# sourceMappingURL=strataArch.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Debian build profile. Debian builds Strata through the shared
|
|
3
|
+
* Linux route (the engine's own setup.sh), so this profile reuses the shared
|
|
4
|
+
* Linux profile and carries no build steps of its own.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataDebian
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const STRATA_DEBIAN: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=strataDebian.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Debian build profile. Debian builds Strata through the shared
|
|
3
|
+
* Linux route (the engine's own setup.sh), so this profile reuses the shared
|
|
4
|
+
* Linux profile and carries no build steps of its own.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataDebian
|
|
6
|
+
*/
|
|
7
|
+
import { STRATA_LINUX } from "./strataLinux.js";
|
|
8
|
+
export const STRATA_DEBIAN = STRATA_LINUX;
|
|
9
|
+
//# sourceMappingURL=strataDebian.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Fedora build profile. Fedora builds Strata through the shared
|
|
3
|
+
* Linux route (the engine's own setup.sh), so this profile reuses the shared
|
|
4
|
+
* Linux profile and carries no build steps of its own.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataFedora
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const STRATA_FEDORA: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=strataFedora.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Fedora build profile. Fedora builds Strata through the shared
|
|
3
|
+
* Linux route (the engine's own setup.sh), so this profile reuses the shared
|
|
4
|
+
* Linux profile and carries no build steps of its own.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataFedora
|
|
6
|
+
*/
|
|
7
|
+
import { STRATA_LINUX } from "./strataLinux.js";
|
|
8
|
+
export const STRATA_FEDORA = STRATA_LINUX;
|
|
9
|
+
//# sourceMappingURL=strataFedora.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata shared Linux build profile. Every Linux distro (Arch, Debian,
|
|
3
|
+
* Fedora) builds Strata through the engine's own setup.sh: the README's
|
|
4
|
+
* Build-from-source route, which downloads what it needs and installs the
|
|
5
|
+
* `strata` Terminal to the path. `--yes` takes the recommended answer to every
|
|
6
|
+
* question and `--no-start` builds and installs without starting the server,
|
|
7
|
+
* which the adapter's launch step then does. There is no build directory,
|
|
8
|
+
* because setup.sh installs the binary to the path. The distro profiles reuse
|
|
9
|
+
* this profile.
|
|
10
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataLinux
|
|
11
|
+
*/
|
|
12
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
13
|
+
import { type StrataSourceLaunchArgs } from './strata.ts';
|
|
14
|
+
export declare const STRATA_LINUX: EngineOsProfile;
|
|
15
|
+
/**
|
|
16
|
+
* strataLinuxSourceLaunch renders the source-build launch argv for the Linux
|
|
17
|
+
* route: the engine's own setup.sh with --yes (unattended) and the resolved
|
|
18
|
+
* model, family, vision, context, and port. macOS reuses this route.
|
|
19
|
+
*/
|
|
20
|
+
export declare function strataLinuxSourceLaunch(args: StrataSourceLaunchArgs): string[];
|
|
21
|
+
//# sourceMappingURL=strataLinux.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata shared Linux build profile. Every Linux distro (Arch, Debian,
|
|
3
|
+
* Fedora) builds Strata through the engine's own setup.sh: the README's
|
|
4
|
+
* Build-from-source route, which downloads what it needs and installs the
|
|
5
|
+
* `strata` Terminal to the path. `--yes` takes the recommended answer to every
|
|
6
|
+
* question and `--no-start` builds and installs without starting the server,
|
|
7
|
+
* which the adapter's launch step then does. There is no build directory,
|
|
8
|
+
* because setup.sh installs the binary to the path. The distro profiles reuse
|
|
9
|
+
* this profile.
|
|
10
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataLinux
|
|
11
|
+
*/
|
|
12
|
+
import { strataSourceLaunchArgs } from "./strata.js";
|
|
13
|
+
import { SYSTEM_DEPS } from "../../systemDeps.js";
|
|
14
|
+
export const STRATA_LINUX = {
|
|
15
|
+
buildSteps: ['cd {dir} && ./setup.sh --yes --no-start'],
|
|
16
|
+
binary: 'strata',
|
|
17
|
+
// The Strata source build git-clones the repo and runs setup.sh, which
|
|
18
|
+
// downloads what it needs; the only host deps are git (the clone) and curl
|
|
19
|
+
// (the model download).
|
|
20
|
+
deps: [SYSTEM_DEPS.git, SYSTEM_DEPS.curl],
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* strataLinuxSourceLaunch renders the source-build launch argv for the Linux
|
|
24
|
+
* route: the engine's own setup.sh with --yes (unattended) and the resolved
|
|
25
|
+
* model, family, vision, context, and port. macOS reuses this route.
|
|
26
|
+
*/
|
|
27
|
+
export function strataLinuxSourceLaunch(args) {
|
|
28
|
+
return strataSourceLaunchArgs('setup.sh', args);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=strataLinux.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata macOS build profile. macOS builds Strata through the engine's own
|
|
3
|
+
* setup.sh, the same route as Linux (the README's setup walks both), so this
|
|
4
|
+
* profile reuses the shared Linux build steps; the binary keeps its plain
|
|
5
|
+
* name (no .exe on macOS).
|
|
6
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataMacOS
|
|
7
|
+
*/
|
|
8
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
9
|
+
import type { StrataSourceLaunchArgs } from './strata.ts';
|
|
10
|
+
export declare const STRATA_MACOS: EngineOsProfile;
|
|
11
|
+
/**
|
|
12
|
+
* strataMacOSSourceLaunch reuses the Linux source-build launch: macOS builds
|
|
13
|
+
* through the same setup.sh route, so the argv is identical.
|
|
14
|
+
*/
|
|
15
|
+
export declare function strataMacOSSourceLaunch(args: StrataSourceLaunchArgs): string[];
|
|
16
|
+
//# sourceMappingURL=strataMacOS.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata macOS build profile. macOS builds Strata through the engine's own
|
|
3
|
+
* setup.sh, the same route as Linux (the README's setup walks both), so this
|
|
4
|
+
* profile reuses the shared Linux build steps; the binary keeps its plain
|
|
5
|
+
* name (no .exe on macOS).
|
|
6
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataMacOS
|
|
7
|
+
*/
|
|
8
|
+
import { STRATA_LINUX, strataLinuxSourceLaunch } from "./strataLinux.js";
|
|
9
|
+
export const STRATA_MACOS = STRATA_LINUX;
|
|
10
|
+
/**
|
|
11
|
+
* strataMacOSSourceLaunch reuses the Linux source-build launch: macOS builds
|
|
12
|
+
* through the same setup.sh route, so the argv is identical.
|
|
13
|
+
*/
|
|
14
|
+
export function strataMacOSSourceLaunch(args) {
|
|
15
|
+
return strataLinuxSourceLaunch(args);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=strataMacOS.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Windows build profile. The Windows source route is the engine's
|
|
3
|
+
* own START-HERE.bat wrapper (docs/SOURCE_INSTALL.md, From source: Windows),
|
|
4
|
+
* not the Linux setup.sh. `--yes` accepts the recommended answer to every
|
|
5
|
+
* question, so the step runs unattended. The wrapper acquires a ready-made
|
|
6
|
+
* engine when one fits the PC, and compiles one when it does not: the
|
|
7
|
+
* compile needs the Visual Studio 2022 Build Tools with the C++ workload
|
|
8
|
+
* (the sources are C++20, so VS2019 is too old). When setup cannot find the
|
|
9
|
+
* toolchain, point STRATA_VCVARS at vcvars64.bat before running. The build
|
|
10
|
+
* keeps its dependencies and products in the source install and writes the
|
|
11
|
+
* launch scripts (run-<model>.bat) and run configs (strata-<model>.json)
|
|
12
|
+
* into the checkout, so the profile carries no build directory. Updates run
|
|
13
|
+
* through UPDATE.bat.
|
|
14
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataWindows
|
|
15
|
+
*/
|
|
16
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
17
|
+
import { type StrataSourceLaunchArgs } from './strata.ts';
|
|
18
|
+
export declare const STRATA_WINDOWS: EngineOsProfile;
|
|
19
|
+
/**
|
|
20
|
+
* strataWindowsSourceLaunch renders the source-build launch argv for the
|
|
21
|
+
* Windows route: the engine's own START-HERE.bat wrapper with --yes
|
|
22
|
+
* (unattended) and the resolved model, family, vision, context, and port. The
|
|
23
|
+
* wrapper acquires a ready-made engine when one fits the PC, and compiles one
|
|
24
|
+
* (the Visual Studio 2022 C++ toolchain) when it does not.
|
|
25
|
+
*/
|
|
26
|
+
export declare function strataWindowsSourceLaunch(args: StrataSourceLaunchArgs): string[];
|
|
27
|
+
//# sourceMappingURL=strataWindows.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Strata Windows build profile. The Windows source route is the engine's
|
|
3
|
+
* own START-HERE.bat wrapper (docs/SOURCE_INSTALL.md, From source: Windows),
|
|
4
|
+
* not the Linux setup.sh. `--yes` accepts the recommended answer to every
|
|
5
|
+
* question, so the step runs unattended. The wrapper acquires a ready-made
|
|
6
|
+
* engine when one fits the PC, and compiles one when it does not: the
|
|
7
|
+
* compile needs the Visual Studio 2022 Build Tools with the C++ workload
|
|
8
|
+
* (the sources are C++20, so VS2019 is too old). When setup cannot find the
|
|
9
|
+
* toolchain, point STRATA_VCVARS at vcvars64.bat before running. The build
|
|
10
|
+
* keeps its dependencies and products in the source install and writes the
|
|
11
|
+
* launch scripts (run-<model>.bat) and run configs (strata-<model>.json)
|
|
12
|
+
* into the checkout, so the profile carries no build directory. Updates run
|
|
13
|
+
* through UPDATE.bat.
|
|
14
|
+
* @module dsh-plugin-local-infer/providers/engines/strata/strataWindows
|
|
15
|
+
*/
|
|
16
|
+
import { strataSourceLaunchArgs } from "./strata.js";
|
|
17
|
+
import { SYSTEM_DEPS } from "../../systemDeps.js";
|
|
18
|
+
export const STRATA_WINDOWS = {
|
|
19
|
+
buildSteps: ['cd {dir} && .\\START-HERE.bat --yes'],
|
|
20
|
+
// The engine command is the strata Terminal on every platform (a
|
|
21
|
+
// PowerShell command on Windows), so the name stays plain.
|
|
22
|
+
binary: 'strata',
|
|
23
|
+
// The Windows source route is the engine's own START-HERE.bat wrapper; the
|
|
24
|
+
// host deps are the same git-plus-curl list as the Linux route.
|
|
25
|
+
deps: [SYSTEM_DEPS.git, SYSTEM_DEPS.curl],
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* strataWindowsSourceLaunch renders the source-build launch argv for the
|
|
29
|
+
* Windows route: the engine's own START-HERE.bat wrapper with --yes
|
|
30
|
+
* (unattended) and the resolved model, family, vision, context, and port. The
|
|
31
|
+
* wrapper acquires a ready-made engine when one fits the PC, and compiles one
|
|
32
|
+
* (the Visual Studio 2022 C++ toolchain) when it does not.
|
|
33
|
+
*/
|
|
34
|
+
export function strataWindowsSourceLaunch(args) {
|
|
35
|
+
return strataSourceLaunchArgs('START-HERE.bat', args);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=strataWindows.js.map
|
|
@@ -20,10 +20,12 @@ export interface EngineInfo {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* The engines the Web card offers, in the order the card lists them. NInfer,
|
|
23
|
-
* Hyper-Qwen, Infernix, llama.cpp, and
|
|
24
|
-
* (llama.cpp's is the specified set the plan names, verified when the
|
|
25
|
-
* lands); Strata's surface is the `strata launch` flags and it supports
|
|
26
|
-
* three build modes (docker, source build, and the binary install)
|
|
23
|
+
* Hyper-Qwen, Infernix, llama.cpp, Strata, and Basalt all carry parameter
|
|
24
|
+
* surfaces (llama.cpp's is the specified set the plan names, verified when the
|
|
25
|
+
* binary lands); Strata's surface is the `strata launch` flags and it supports
|
|
26
|
+
* all three build modes (docker, source build, and the binary install);
|
|
27
|
+
* Basalt's surface is the `basalt_config.json` settings and it is local-build
|
|
28
|
+
* only (the C++/CUDA engine ships no container image).
|
|
27
29
|
*/
|
|
28
30
|
export declare const ENGINES: readonly EngineInfo[];
|
|
29
|
-
//# sourceMappingURL=engines.d.ts.map
|
|
31
|
+
//# sourceMappingURL=engines.d.ts.map
|