dsh-plugin-local-infer 0.1.2 → 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 +32 -6
- package/cordis.patch.yml +7 -0
- package/docs/zh/README.md +24 -4
- package/dsh/client.js +4200 -4049
- package/package.json +33 -11
- package/packages/core/lib/adapter.d.ts +177 -11
- 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 +48 -20
- 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 +25 -14
- package/packages/core/lib/registrar.js +30 -10
- 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 +95 -15
- package/packages/providers/lib/acquire.js +239 -40
- package/packages/providers/lib/adapters.d.ts +155 -221
- package/packages/providers/lib/adapters.js +589 -935
- package/packages/providers/lib/debug.d.ts +1 -1
- package/packages/providers/lib/debug.js +1 -1
- package/packages/providers/lib/deps.d.ts +31 -212
- package/packages/providers/lib/deps.js +71 -205
- 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/{hyperqwen.d.ts → engines/hyperqwen/hyperqwen.d.ts} +2 -2
- package/packages/providers/lib/{hyperqwen.js → engines/hyperqwen/hyperqwen.js} +14 -2
- package/packages/providers/lib/engines/hyperqwen/hyperqwenAdapter.d.ts +38 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenAdapter.js +115 -0
- 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/{infernix.d.ts → engines/infernix/infernix.d.ts} +7 -4
- package/packages/providers/lib/{infernix.js → engines/infernix/infernix.js} +53 -8
- package/packages/providers/lib/engines/infernix/infernixAdapter.d.ts +52 -0
- package/packages/providers/lib/engines/infernix/infernixAdapter.js +235 -0
- 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/{llamacpp.d.ts → engines/llamacpp/llamacpp.d.ts} +2 -2
- package/packages/providers/lib/{llamacpp.js → engines/llamacpp/llamacpp.js} +12 -2
- package/packages/providers/lib/engines/llamacpp/llamacppAdapter.d.ts +50 -0
- package/packages/providers/lib/engines/llamacpp/llamacppAdapter.js +274 -0
- 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/{ninfer.d.ts → engines/ninfer/ninfer.d.ts} +2 -2
- package/packages/providers/lib/{ninfer.js → engines/ninfer/ninfer.js} +25 -3
- package/packages/providers/lib/engines/ninfer/ninferAdapter.d.ts +81 -0
- package/packages/providers/lib/engines/ninfer/ninferAdapter.js +392 -0
- 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/strata.js +264 -0
- package/packages/providers/lib/engines/strata/strataAdapter.d.ts +97 -0
- package/packages/providers/lib/engines/strata/strataAdapter.js +463 -0
- 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 +8 -5
- package/packages/providers/lib/engines.js +22 -11
- 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 -24
- package/packages/providers/lib/index.js +46 -24
- package/packages/providers/lib/model-defaults.d.ts +10 -5
- package/packages/providers/lib/model-defaults.js +47 -5
- package/packages/providers/lib/platform.d.ts +8 -5
- package/packages/providers/lib/platform.js +27 -7
- 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 +187 -23
- package/packages/service/lib/index.js +667 -90
- 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 +166 -8
- 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 +89 -0
- package/packages/ui/lib/config.js +251 -0
- package/packages/ui/lib/deps.d.ts +4 -4
- 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 +216 -0
- package/packages/ui/lib/ops/engine.js +697 -0
- 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 +42 -0
- package/packages/ui/lib/ops/hf.js +150 -0
- package/packages/ui/lib/ops/logs.d.ts +78 -0
- package/packages/ui/lib/ops/logs.js +119 -0
- package/packages/ui/lib/ops/model.d.ts +71 -0
- package/packages/ui/lib/ops/model.js +123 -0
- package/packages/ui/lib/request.d.ts +106 -0
- package/packages/ui/lib/request.js +80 -0
- package/packages/ui/lib/route.d.ts +106 -422
- package/packages/ui/lib/route.js +136 -1845
- package/packages/ui/lib/routes/chat-template.d.ts +1 -0
- package/packages/ui/lib/routes/chat-template.js +1 -0
- package/packages/ui/lib/routes/deps.d.ts +1 -0
- package/packages/ui/lib/routes/deps.js +1 -0
- package/packages/ui/lib/routes/download.d.ts +1 -0
- package/packages/ui/lib/routes/download.js +1 -0
- package/packages/ui/lib/routes/get.d.ts +1 -0
- package/packages/ui/lib/routes/get.js +106 -0
- package/packages/ui/lib/routes/install.d.ts +16 -0
- package/packages/ui/lib/routes/install.js +36 -0
- package/packages/ui/lib/routes/launch.d.ts +24 -0
- package/packages/ui/lib/routes/launch.js +74 -0
- 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 +15 -0
- package/packages/ui/lib/routes/provider-delete.js +37 -0
- package/packages/ui/lib/routes/register.d.ts +16 -0
- package/packages/ui/lib/routes/register.js +28 -0
- package/packages/ui/lib/routes/save.d.ts +18 -0
- package/packages/ui/lib/routes/save.js +159 -0
- package/packages/ui/lib/routes/stop.d.ts +19 -0
- package/packages/ui/lib/routes/stop.js +32 -0
- 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 +15 -0
- package/packages/ui/lib/routes/summary.js +26 -0
- package/packages/ui/lib/routes/unregister.d.ts +14 -0
- package/packages/ui/lib/routes/unregister.js +26 -0
- package/packages/ui/lib/viewmodels/deps.d.ts +1 -0
- package/packages/ui/lib/viewmodels/deps.js +1 -0
- package/packages/ui/lib/viewmodels/depsHelpers.d.ts +1 -0
- package/packages/ui/lib/viewmodels/depsHelpers.js +94 -0
- package/packages/ui/lib/viewmodels/summary.d.ts +145 -0
- package/packages/ui/lib/viewmodels/summary.js +245 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +30 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.js +42 -0
- 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/strata.d.ts +0 -15
- package/packages/providers/lib/strata.js +0 -14
|
@@ -1,226 +1,45 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The per-
|
|
3
|
-
* the
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* container runtime, and every engine downloads its model through the hf CLI.
|
|
2
|
+
* The per-engine dep plans, keyed by engine id. The local build-mode lists are
|
|
3
|
+
* sourced from the engine OS profile's deps (the Windows profile carries the
|
|
4
|
+
* winget/MSVC toolchain, the shared Linux profile the apt/dnf/pacman/brew
|
|
5
|
+
* toolchain), so the per-platform local lists have one home in the profiles.
|
|
6
|
+
* The docker and binary lists stay central here: they are build modes, not
|
|
7
|
+
* platform-specific, so they do not ride the OS profiles.
|
|
9
8
|
*
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
9
|
+
* The shared SystemDep install command catalog (the named host deps every
|
|
10
|
+
* list composes) lives in systemDeps.ts; it is re-exported here so the
|
|
11
|
+
* catalog keeps its public home in this module.
|
|
12
12
|
* @module dsh-plugin-local-infer/providers/deps
|
|
13
13
|
*/
|
|
14
|
-
import type { EngineDepPlan,
|
|
14
|
+
import type { EngineDepPlan, SystemDep } from 'dsh-plugin-local-infer/core';
|
|
15
|
+
export { SYSTEM_DEPS } from './systemDeps.ts';
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* engineLocalDeps reads the host build deps an engine's local build needs on
|
|
18
|
+
* an OS, from the engine OS profile's deps (the single home for the
|
|
19
|
+
* per-platform toolchain). A Windows host reads the Windows profile (the
|
|
20
|
+
* winget/MSVC route); every other host reads the shared Linux profile, so a
|
|
21
|
+
* macOS host gets the Linux toolchain list.
|
|
19
22
|
*/
|
|
20
|
-
export declare
|
|
21
|
-
cmake: {
|
|
22
|
-
id: string;
|
|
23
|
-
purpose: string;
|
|
24
|
-
requiresSudo: true;
|
|
25
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
26
|
-
install: {
|
|
27
|
-
apt: {
|
|
28
|
-
commands: string[];
|
|
29
|
-
};
|
|
30
|
-
dnf: {
|
|
31
|
-
commands: string[];
|
|
32
|
-
};
|
|
33
|
-
pacman: {
|
|
34
|
-
commands: string[];
|
|
35
|
-
};
|
|
36
|
-
brew: {
|
|
37
|
-
commands: string[];
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
ninja: {
|
|
42
|
-
id: string;
|
|
43
|
-
purpose: string;
|
|
44
|
-
requiresSudo: true;
|
|
45
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
46
|
-
install: {
|
|
47
|
-
apt: {
|
|
48
|
-
commands: string[];
|
|
49
|
-
};
|
|
50
|
-
dnf: {
|
|
51
|
-
commands: string[];
|
|
52
|
-
};
|
|
53
|
-
pacman: {
|
|
54
|
-
commands: string[];
|
|
55
|
-
};
|
|
56
|
-
brew: {
|
|
57
|
-
commands: string[];
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
pkgConfig: {
|
|
62
|
-
id: string;
|
|
63
|
-
purpose: string;
|
|
64
|
-
requiresSudo: true;
|
|
65
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
66
|
-
install: {
|
|
67
|
-
apt: {
|
|
68
|
-
commands: string[];
|
|
69
|
-
};
|
|
70
|
-
dnf: {
|
|
71
|
-
commands: string[];
|
|
72
|
-
};
|
|
73
|
-
pacman: {
|
|
74
|
-
commands: string[];
|
|
75
|
-
};
|
|
76
|
-
brew: {
|
|
77
|
-
commands: string[];
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
ffmpeg: {
|
|
82
|
-
id: string;
|
|
83
|
-
purpose: string;
|
|
84
|
-
requiresSudo: true;
|
|
85
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
86
|
-
install: {
|
|
87
|
-
apt: {
|
|
88
|
-
commands: string[];
|
|
89
|
-
};
|
|
90
|
-
dnf: {
|
|
91
|
-
commands: string[];
|
|
92
|
-
};
|
|
93
|
-
pacman: {
|
|
94
|
-
commands: string[];
|
|
95
|
-
};
|
|
96
|
-
brew: {
|
|
97
|
-
commands: string[];
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
curl: {
|
|
102
|
-
id: string;
|
|
103
|
-
purpose: string;
|
|
104
|
-
requiresSudo: true;
|
|
105
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
106
|
-
install: {
|
|
107
|
-
apt: {
|
|
108
|
-
commands: string[];
|
|
109
|
-
};
|
|
110
|
-
dnf: {
|
|
111
|
-
commands: string[];
|
|
112
|
-
};
|
|
113
|
-
pacman: {
|
|
114
|
-
commands: string[];
|
|
115
|
-
};
|
|
116
|
-
brew: {
|
|
117
|
-
commands: string[];
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
cudaToolkit: {
|
|
122
|
-
id: string;
|
|
123
|
-
purpose: string;
|
|
124
|
-
requiresSudo: true;
|
|
125
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
126
|
-
install: {
|
|
127
|
-
apt: {
|
|
128
|
-
commands: string[];
|
|
129
|
-
envAfter: {
|
|
130
|
-
CUDACXX: string;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
dnf: {
|
|
134
|
-
commands: string[];
|
|
135
|
-
envAfter: {
|
|
136
|
-
CUDACXX: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
pacman: {
|
|
140
|
-
commands: string[];
|
|
141
|
-
envAfter: {
|
|
142
|
-
CUDAToolkit_ROOT: string;
|
|
143
|
-
CUDACXX: string;
|
|
144
|
-
TORCH_CUDA_ARCH_LIST: string;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
brew: {
|
|
148
|
-
commands: string[];
|
|
149
|
-
envAfter: {
|
|
150
|
-
CUDACXX: string;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
docker: {
|
|
156
|
-
id: string;
|
|
157
|
-
purpose: string;
|
|
158
|
-
requiresSudo: true;
|
|
159
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
160
|
-
install: {
|
|
161
|
-
apt: {
|
|
162
|
-
commands: string[];
|
|
163
|
-
};
|
|
164
|
-
dnf: {
|
|
165
|
-
commands: string[];
|
|
166
|
-
};
|
|
167
|
-
pacman: {
|
|
168
|
-
commands: string[];
|
|
169
|
-
};
|
|
170
|
-
brew: {
|
|
171
|
-
commands: string[];
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
nvidiaContainerToolkit: {
|
|
176
|
-
id: string;
|
|
177
|
-
purpose: string;
|
|
178
|
-
requiresSudo: true;
|
|
179
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
180
|
-
install: {
|
|
181
|
-
apt: {
|
|
182
|
-
commands: string[];
|
|
183
|
-
};
|
|
184
|
-
dnf: {
|
|
185
|
-
commands: string[];
|
|
186
|
-
};
|
|
187
|
-
pacman: {
|
|
188
|
-
commands: string[];
|
|
189
|
-
};
|
|
190
|
-
brew: {
|
|
191
|
-
commands: never[];
|
|
192
|
-
};
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
hfCli: {
|
|
196
|
-
id: string;
|
|
197
|
-
purpose: string;
|
|
198
|
-
requiresSudo: false;
|
|
199
|
-
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
200
|
-
install: {
|
|
201
|
-
apt: {
|
|
202
|
-
commands: string[];
|
|
203
|
-
};
|
|
204
|
-
dnf: {
|
|
205
|
-
commands: string[];
|
|
206
|
-
};
|
|
207
|
-
pacman: {
|
|
208
|
-
commands: string[];
|
|
209
|
-
};
|
|
210
|
-
brew: {
|
|
211
|
-
commands: string[];
|
|
212
|
-
};
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
};
|
|
23
|
+
export declare function engineLocalDeps(engineId: string, os: 'linux' | 'windows' | 'macos'): readonly SystemDep[];
|
|
216
24
|
/**
|
|
217
25
|
* The per-engine dep plans, keyed by engine id. The local NInfer list is the
|
|
218
26
|
* qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
|
|
219
27
|
* docker lists are the container runtime plus the GPU toolkit plus the hf
|
|
220
28
|
* CLI. Infernix builds through the engine's own cmake preset, so its local
|
|
221
29
|
* list is the same toolchain as NInfer's, and its docker list stays empty
|
|
222
|
-
* because the engine ships no container image. llama.cpp
|
|
223
|
-
*
|
|
30
|
+
* because the engine ships no container image. llama.cpp carries a thin
|
|
31
|
+
* cmake-plus-hf list. Strata carries one list per build mode: the source
|
|
32
|
+
* build needs git and curl, the binary install needs curl, and the docker
|
|
33
|
+
* mode needs the container runtime plus the GPU toolkit.
|
|
34
|
+
*
|
|
35
|
+
* The local lists ride the plan as a per-OS record (the linux and windows
|
|
36
|
+
* entries), read from the engine OS profile's deps through engineLocalDeps,
|
|
37
|
+
* so the per-platform toolchain (the apt/dnf/pacman/brew route on Linux, the
|
|
38
|
+
* winget/MSVC route on Windows) has one home in the profiles. An engine with
|
|
39
|
+
* no dedicated Windows toolchain (hyperqwen, llamacpp, strata) reads the same
|
|
40
|
+
* list for both entries: its Windows profile reuses the shared Linux profile
|
|
41
|
+
* (hyperqwen, empty for the compose engine) or declares the identical list
|
|
42
|
+
* (llamacpp, strata).
|
|
224
43
|
*/
|
|
225
44
|
export declare const ENGINE_DEP_PLANS: Record<string, EngineDepPlan>;
|
|
226
|
-
//# sourceMappingURL=deps.d.ts.map
|
|
45
|
+
//# sourceMappingURL=deps.d.ts.map
|
|
@@ -1,235 +1,101 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The per-
|
|
3
|
-
* the
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* container runtime, and every engine downloads its model through the hf CLI.
|
|
2
|
+
* The per-engine dep plans, keyed by engine id. The local build-mode lists are
|
|
3
|
+
* sourced from the engine OS profile's deps (the Windows profile carries the
|
|
4
|
+
* winget/MSVC toolchain, the shared Linux profile the apt/dnf/pacman/brew
|
|
5
|
+
* toolchain), so the per-platform local lists have one home in the profiles.
|
|
6
|
+
* The docker and binary lists stay central here: they are build modes, not
|
|
7
|
+
* platform-specific, so they do not ride the OS profiles.
|
|
9
8
|
*
|
|
10
|
-
* The
|
|
11
|
-
*
|
|
9
|
+
* The shared SystemDep install command catalog (the named host deps every
|
|
10
|
+
* list composes) lives in systemDeps.ts; it is re-exported here so the
|
|
11
|
+
* catalog keeps its public home in this module.
|
|
12
12
|
* @module dsh-plugin-local-infer/providers/deps
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { engineOsProfile } from "./acquire.js";
|
|
15
|
+
import { SYSTEM_DEPS } from "./systemDeps.js";
|
|
16
|
+
export { SYSTEM_DEPS } from "./systemDeps.js";
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
+
* engineLocalDeps reads the host build deps an engine's local build needs on
|
|
19
|
+
* an OS, from the engine OS profile's deps (the single home for the
|
|
20
|
+
* per-platform toolchain). A Windows host reads the Windows profile (the
|
|
21
|
+
* winget/MSVC route); every other host reads the shared Linux profile, so a
|
|
22
|
+
* macOS host gets the Linux toolchain list.
|
|
18
23
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* A missing binary, a non-zero exit, and a timeout all read as not installed,
|
|
23
|
-
* which the checkDeps rule degrades to the missing status.
|
|
24
|
-
*/
|
|
25
|
-
function probe(binary, args) {
|
|
26
|
-
return async (_hw) => {
|
|
27
|
-
try {
|
|
28
|
-
await execFile(binary, args, { timeout: PROBE_TIMEOUT_MS });
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
24
|
+
export function engineLocalDeps(engineId, os) {
|
|
25
|
+
const profile = engineOsProfile(engineId, os === 'windows' ? 'windows' : 'linux');
|
|
26
|
+
return profile?.deps ?? [];
|
|
35
27
|
}
|
|
36
|
-
/**
|
|
37
|
-
* The named host deps every engine plan composes. The install blocks are the
|
|
38
|
-
* copy/paste commands the user runs; envAfter carries the per-manager export
|
|
39
|
-
* lines (the CUDA paths differ between Debian and Arch).
|
|
40
|
-
*/
|
|
41
|
-
export const SYSTEM_DEPS = {
|
|
42
|
-
cmake: {
|
|
43
|
-
id: 'cmake',
|
|
44
|
-
purpose: 'compiles the local engine',
|
|
45
|
-
requiresSudo: true,
|
|
46
|
-
detect: probe('cmake', ['--version']),
|
|
47
|
-
install: {
|
|
48
|
-
apt: { commands: ['sudo apt install cmake'] },
|
|
49
|
-
dnf: { commands: ['sudo dnf install cmake'] },
|
|
50
|
-
pacman: { commands: ['sudo pacman -S --noconfirm cmake'] },
|
|
51
|
-
brew: { commands: ['brew install cmake'] },
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
ninja: {
|
|
55
|
-
id: 'ninja',
|
|
56
|
-
purpose: 'drives the cmake build',
|
|
57
|
-
requiresSudo: true,
|
|
58
|
-
detect: probe('ninja', ['--version']),
|
|
59
|
-
install: {
|
|
60
|
-
apt: { commands: ['sudo apt install ninja-build'] },
|
|
61
|
-
dnf: { commands: ['sudo dnf install ninja'] },
|
|
62
|
-
pacman: { commands: ['sudo pacman -S --noconfirm ninja'] },
|
|
63
|
-
brew: { commands: ['brew install ninja'] },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
pkgConfig: {
|
|
67
|
-
id: 'pkg-config',
|
|
68
|
-
purpose: 'links the ffmpeg and curl dev libraries',
|
|
69
|
-
requiresSudo: true,
|
|
70
|
-
detect: probe('pkg-config', ['--version']),
|
|
71
|
-
install: {
|
|
72
|
-
apt: { commands: ['sudo apt install pkg-config'] },
|
|
73
|
-
dnf: { commands: ['sudo dnf install pkgconf-pkg-config'] },
|
|
74
|
-
pacman: { commands: ['sudo pacman -S --noconfirm pkgconf'] },
|
|
75
|
-
brew: { commands: ['brew install pkgconf'] },
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
ffmpeg: {
|
|
79
|
-
id: 'ffmpeg',
|
|
80
|
-
purpose: 'links the media codecs the vision tower needs',
|
|
81
|
-
requiresSudo: true,
|
|
82
|
-
detect: probe('ffmpeg', ['-version']),
|
|
83
|
-
install: {
|
|
84
|
-
apt: {
|
|
85
|
-
commands: ['sudo apt install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev'],
|
|
86
|
-
},
|
|
87
|
-
dnf: { commands: ['sudo dnf install ffmpeg-devel'] },
|
|
88
|
-
pacman: { commands: ['sudo pacman -S --noconfirm ffmpeg'] },
|
|
89
|
-
brew: { commands: ['brew install ffmpeg'] },
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
curl: {
|
|
93
|
-
id: 'curl',
|
|
94
|
-
purpose: 'links the HTTP client dev headers',
|
|
95
|
-
requiresSudo: true,
|
|
96
|
-
detect: probe('curl', ['--version']),
|
|
97
|
-
install: {
|
|
98
|
-
apt: { commands: ['sudo apt install libcurl4-openssl-dev'] },
|
|
99
|
-
dnf: { commands: ['sudo dnf install libcurl-devel'] },
|
|
100
|
-
pacman: { commands: ['sudo pacman -S --noconfirm curl'] },
|
|
101
|
-
brew: { commands: ['brew install curl'] },
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
cudaToolkit: {
|
|
105
|
-
id: 'cuda-toolkit',
|
|
106
|
-
purpose: 'compiles the CUDA kernels',
|
|
107
|
-
requiresSudo: true,
|
|
108
|
-
detect: probe('nvcc', ['--version']),
|
|
109
|
-
install: {
|
|
110
|
-
// The qwen-ninfer header, verbatim: the ubuntu2604 CUDA keyring plus the
|
|
111
|
-
// toolkit, then the nvcc export the build reads.
|
|
112
|
-
apt: {
|
|
113
|
-
commands: [
|
|
114
|
-
'wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb',
|
|
115
|
-
'sudo dpkg -i cuda-keyring_1.1-1_all.deb',
|
|
116
|
-
'sudo apt-get update',
|
|
117
|
-
'sudo apt-get -y install cuda-toolkit-13-4',
|
|
118
|
-
],
|
|
119
|
-
envAfter: { CUDACXX: '/usr/local/cuda/bin/nvcc' },
|
|
120
|
-
},
|
|
121
|
-
dnf: {
|
|
122
|
-
commands: ['sudo dnf install cuda-toolkit'],
|
|
123
|
-
envAfter: { CUDACXX: '/usr/bin/nvcc' },
|
|
124
|
-
},
|
|
125
|
-
pacman: {
|
|
126
|
-
commands: ['sudo pacman -S --noconfirm cuda'],
|
|
127
|
-
envAfter: {
|
|
128
|
-
CUDAToolkit_ROOT: '/opt/cuda',
|
|
129
|
-
CUDACXX: '/opt/cuda/bin/nvcc',
|
|
130
|
-
TORCH_CUDA_ARCH_LIST: '12.0',
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
brew: {
|
|
134
|
-
commands: ['brew install --cask nvidia-cuda'],
|
|
135
|
-
envAfter: { CUDACXX: '/usr/local/cuda/bin/nvcc' },
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
docker: {
|
|
140
|
-
id: 'docker',
|
|
141
|
-
purpose: 'runs the engine in a container',
|
|
142
|
-
requiresSudo: true,
|
|
143
|
-
detect: probe('docker', ['--version']),
|
|
144
|
-
install: {
|
|
145
|
-
apt: { commands: ['sudo apt install docker.io'] },
|
|
146
|
-
dnf: { commands: ['sudo dnf install docker'] },
|
|
147
|
-
pacman: { commands: ['sudo pacman -S --noconfirm docker'] },
|
|
148
|
-
brew: { commands: ['brew install --cask docker'] },
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
nvidiaContainerToolkit: {
|
|
152
|
-
id: 'nvidia-container-toolkit',
|
|
153
|
-
purpose: 'lets the container see the GPU',
|
|
154
|
-
requiresSudo: true,
|
|
155
|
-
detect: probe('nvidia-ctk', ['--version']),
|
|
156
|
-
install: {
|
|
157
|
-
// The NVIDIA-published apt setup. Untested on a live host, so it rides
|
|
158
|
-
// the plan's "flagged when untested" rule.
|
|
159
|
-
apt: {
|
|
160
|
-
commands: [
|
|
161
|
-
'curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg',
|
|
162
|
-
'curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed \'s#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#\' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list',
|
|
163
|
-
'sudo apt-get update',
|
|
164
|
-
'sudo apt-get install -y nvidia-container-toolkit',
|
|
165
|
-
],
|
|
166
|
-
},
|
|
167
|
-
dnf: { commands: ['sudo dnf install nvidia-container-toolkit'] },
|
|
168
|
-
pacman: { commands: ['sudo pacman -S --noconfirm nvidia-container-toolkit'] },
|
|
169
|
-
// macOS has no NVIDIA GPU toolkit; the by-hand note renders instead.
|
|
170
|
-
brew: { commands: [] },
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
hfCli: {
|
|
174
|
-
id: 'hf-cli',
|
|
175
|
-
purpose: 'downloads the model artifact',
|
|
176
|
-
requiresSudo: false,
|
|
177
|
-
detect: probe('hf', ['--version']),
|
|
178
|
-
install: {
|
|
179
|
-
// The hf CLI installs through its own script, not a package manager, so
|
|
180
|
-
// every manager keys the same block.
|
|
181
|
-
apt: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
182
|
-
dnf: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
183
|
-
pacman: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
184
|
-
brew: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
28
|
/**
|
|
189
29
|
* The per-engine dep plans, keyed by engine id. The local NInfer list is the
|
|
190
30
|
* qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
|
|
191
31
|
* docker lists are the container runtime plus the GPU toolkit plus the hf
|
|
192
32
|
* CLI. Infernix builds through the engine's own cmake preset, so its local
|
|
193
33
|
* list is the same toolchain as NInfer's, and its docker list stays empty
|
|
194
|
-
* because the engine ships no container image. llama.cpp
|
|
195
|
-
*
|
|
34
|
+
* because the engine ships no container image. llama.cpp carries a thin
|
|
35
|
+
* cmake-plus-hf list. Strata carries one list per build mode: the source
|
|
36
|
+
* build needs git and curl, the binary install needs curl, and the docker
|
|
37
|
+
* mode needs the container runtime plus the GPU toolkit.
|
|
38
|
+
*
|
|
39
|
+
* The local lists ride the plan as a per-OS record (the linux and windows
|
|
40
|
+
* entries), read from the engine OS profile's deps through engineLocalDeps,
|
|
41
|
+
* so the per-platform toolchain (the apt/dnf/pacman/brew route on Linux, the
|
|
42
|
+
* winget/MSVC route on Windows) has one home in the profiles. An engine with
|
|
43
|
+
* no dedicated Windows toolchain (hyperqwen, llamacpp, strata) reads the same
|
|
44
|
+
* list for both entries: its Windows profile reuses the shared Linux profile
|
|
45
|
+
* (hyperqwen, empty for the compose engine) or declares the identical list
|
|
46
|
+
* (llamacpp, strata).
|
|
196
47
|
*/
|
|
197
48
|
export const ENGINE_DEP_PLANS = {
|
|
198
49
|
ninfer: {
|
|
199
|
-
local:
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
SYSTEM_DEPS.ffmpeg,
|
|
204
|
-
SYSTEM_DEPS.curl,
|
|
205
|
-
SYSTEM_DEPS.cudaToolkit,
|
|
206
|
-
SYSTEM_DEPS.hfCli,
|
|
207
|
-
],
|
|
50
|
+
local: {
|
|
51
|
+
linux: engineLocalDeps('ninfer', 'linux'),
|
|
52
|
+
windows: engineLocalDeps('ninfer', 'windows'),
|
|
53
|
+
},
|
|
208
54
|
docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit, SYSTEM_DEPS.hfCli],
|
|
209
55
|
},
|
|
210
56
|
hyperqwen: {
|
|
211
|
-
local:
|
|
57
|
+
local: {
|
|
58
|
+
linux: engineLocalDeps('hyperqwen', 'linux'),
|
|
59
|
+
windows: engineLocalDeps('hyperqwen', 'windows'),
|
|
60
|
+
},
|
|
212
61
|
docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit, SYSTEM_DEPS.hfCli],
|
|
213
62
|
},
|
|
214
63
|
llamacpp: {
|
|
215
|
-
local:
|
|
64
|
+
local: {
|
|
65
|
+
linux: engineLocalDeps('llamacpp', 'linux'),
|
|
66
|
+
windows: engineLocalDeps('llamacpp', 'windows'),
|
|
67
|
+
},
|
|
216
68
|
docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.hfCli],
|
|
217
69
|
},
|
|
218
70
|
infernix: {
|
|
219
|
-
local:
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
SYSTEM_DEPS.ffmpeg,
|
|
224
|
-
SYSTEM_DEPS.curl,
|
|
225
|
-
SYSTEM_DEPS.cudaToolkit,
|
|
226
|
-
SYSTEM_DEPS.hfCli,
|
|
227
|
-
],
|
|
71
|
+
local: {
|
|
72
|
+
linux: engineLocalDeps('infernix', 'linux'),
|
|
73
|
+
windows: engineLocalDeps('infernix', 'windows'),
|
|
74
|
+
},
|
|
228
75
|
docker: [],
|
|
229
76
|
},
|
|
230
77
|
strata: {
|
|
231
|
-
|
|
232
|
-
|
|
78
|
+
// The source build git-clones the repo and runs setup.sh, which downloads
|
|
79
|
+
// what it needs; the binary install is the one-line curl script; the docker
|
|
80
|
+
// mode needs the container runtime plus the GPU toolkit (the model downloads
|
|
81
|
+
// inside the container, so no hf CLI).
|
|
82
|
+
local: {
|
|
83
|
+
linux: engineLocalDeps('strata', 'linux'),
|
|
84
|
+
windows: engineLocalDeps('strata', 'windows'),
|
|
85
|
+
},
|
|
86
|
+
docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit],
|
|
87
|
+
binary: [SYSTEM_DEPS.curl],
|
|
88
|
+
},
|
|
89
|
+
basalt: {
|
|
90
|
+
// The CMake source build needs the C++/CUDA toolchain, the Python
|
|
91
|
+
// interpreter plus the serve/ server's pip requirements, and the hf CLI
|
|
92
|
+
// for the model artifact. Basalt ships no container image, so the docker
|
|
93
|
+
// list stays empty.
|
|
94
|
+
local: {
|
|
95
|
+
linux: engineLocalDeps('basalt', 'linux'),
|
|
96
|
+
windows: engineLocalDeps('basalt', 'windows'),
|
|
97
|
+
},
|
|
98
|
+
docker: [],
|
|
233
99
|
},
|
|
234
100
|
};
|
|
235
|
-
//# sourceMappingURL=deps.js.map
|
|
101
|
+
//# sourceMappingURL=deps.js.map
|