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
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Built-in preset data for the local-inference defaults layer. The presets are
|
|
3
3
|
* the offline floor the DefaultsResolver resolves against: the NInfer
|
|
4
4
|
* measured configs (the `config-calculator.html` figures and the
|
|
5
|
-
* `qwen-ninfer` launcher, on a 24 GiB sm86 card)
|
|
5
|
+
* `qwen-ninfer` launcher, on a 24 GiB sm86 card), the Hyper-Qwen `.env`
|
|
6
6
|
* profiles (the single-user speed, long-context, and huge-context tiers from
|
|
7
|
-
* `.env.example`)
|
|
8
|
-
*
|
|
7
|
+
* `.env.example`), and the Basalt Blackwell long-context starting config
|
|
8
|
+
* (keyed to the wildcard class, since Basalt runs on any Blackwell card).
|
|
9
|
+
* Each preset is keyed by its exact (engine, model, hardware class) triple, so
|
|
10
|
+
* it is only trusted for the hardware it was sourced for.
|
|
9
11
|
*
|
|
10
12
|
* The `PRESET_SOURCES` list names the mod-search fetch path: the URL the
|
|
11
13
|
* bridge pulls and the pure extractor that turns the fetched page into a
|
|
@@ -13,6 +15,8 @@
|
|
|
13
15
|
* fetch date.
|
|
14
16
|
* @module dsh-plugin-local-infer/providers/presets
|
|
15
17
|
*/
|
|
18
|
+
import { WILDCARD_HARDWARE_CLASS } from '../../core/lib/index.js';
|
|
19
|
+
import { BASALT_DEEPSEEK_MODEL_ID, BASALT_DEFAULT_MODEL_ID, } from "./engines/basalt/basalt.js";
|
|
16
20
|
/**
|
|
17
21
|
* The hardware class every built-in preset is sourced for: a 24 GiB Ampere
|
|
18
22
|
* (sm86) card, the card the NInfer constants were measured on and the card the
|
|
@@ -118,11 +122,55 @@ const HYPERQWEN_PRESETS = [
|
|
|
118
122
|
label: 'huge-context',
|
|
119
123
|
},
|
|
120
124
|
];
|
|
125
|
+
/**
|
|
126
|
+
* The Basalt built-in presets, keyed to the wildcard hardware class. Basalt
|
|
127
|
+
* is Blackwell-only, so each row is the sane long-context starting config
|
|
128
|
+
* the resolver offers for one artifact on any detected Blackwell card, and
|
|
129
|
+
* each model's own row is its default (the resolver keys presets by the
|
|
130
|
+
* exact engine/model/class triple). The Qwen3.8-Flash-Next NVFP4 row sets
|
|
131
|
+
* int8 KV (half the bytes of the fp16 default) and a 32k context; the
|
|
132
|
+
* DeepSeek-V4.1-Flash UD-IQ1_M row sets only the 32k context, because the
|
|
133
|
+
* pack has no KV-format choice. The engine's own spec defaults (the
|
|
134
|
+
* drafter window, the expert cache, the resident experts) stay at their
|
|
135
|
+
* surface defaults.
|
|
136
|
+
*/
|
|
137
|
+
const BASALT_PRESETS = [
|
|
138
|
+
{
|
|
139
|
+
engineId: 'basalt',
|
|
140
|
+
modelId: BASALT_DEFAULT_MODEL_ID,
|
|
141
|
+
hardwareClass: WILDCARD_HARDWARE_CLASS,
|
|
142
|
+
values: {
|
|
143
|
+
kv: 'int8',
|
|
144
|
+
maxContext: 32768,
|
|
145
|
+
},
|
|
146
|
+
source: 'Basalt built-in (Blackwell long-context starting config)',
|
|
147
|
+
label: 'long-context',
|
|
148
|
+
isDefault: true,
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
engineId: 'basalt',
|
|
152
|
+
modelId: BASALT_DEEPSEEK_MODEL_ID,
|
|
153
|
+
hardwareClass: WILDCARD_HARDWARE_CLASS,
|
|
154
|
+
// No kv: the DeepSeek pack has no KV-format choice, and a flag the
|
|
155
|
+
// model lacks stops the start from a model entry (the surface keeps kv
|
|
156
|
+
// in the shared engine block, where it is skipped for this model).
|
|
157
|
+
values: {
|
|
158
|
+
maxContext: 32768,
|
|
159
|
+
},
|
|
160
|
+
source: 'Basalt built-in (Blackwell long-context starting config)',
|
|
161
|
+
label: 'long-context',
|
|
162
|
+
isDefault: true,
|
|
163
|
+
},
|
|
164
|
+
];
|
|
121
165
|
/**
|
|
122
166
|
* BUILTIN_PRESETS is the combined preset list the providers register with the
|
|
123
167
|
* seam. Adding a preset is a data edit here, never a resolver change.
|
|
124
168
|
*/
|
|
125
|
-
export const BUILTIN_PRESETS = [
|
|
169
|
+
export const BUILTIN_PRESETS = [
|
|
170
|
+
...NINFER_PRESETS,
|
|
171
|
+
...HYPERQWEN_PRESETS,
|
|
172
|
+
...BASALT_PRESETS,
|
|
173
|
+
];
|
|
126
174
|
/**
|
|
127
175
|
* extractJsonBlock reads the first fenced ```json block out of a fetched page
|
|
128
176
|
* and parses it as the preset values. A page with no json block (or a broken
|
|
@@ -158,4 +206,4 @@ export const PRESET_SOURCES = [
|
|
|
158
206
|
extract: extractJsonBlock,
|
|
159
207
|
},
|
|
160
208
|
];
|
|
161
|
-
//# sourceMappingURL=presets.js.map
|
|
209
|
+
//# sourceMappingURL=presets.js.map
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared SystemDep install command catalog. Every engine OS profile and
|
|
3
|
+
* the per-engine dep plans compose their lists from these named deps, so the
|
|
4
|
+
* install blocks (the copy/paste commands the user runs) and the which/version
|
|
5
|
+
* probes have one home. The engine OS profiles import this catalog directly,
|
|
6
|
+
* which keeps them free of a circular edge back through the per-engine plans.
|
|
7
|
+
*
|
|
8
|
+
* Each dep declares its purpose, the which/version probe that reads "already
|
|
9
|
+
* installed", and its install block keyed by package manager, mirroring the
|
|
10
|
+
* qwen-ninfer launcher header (apt and the CUDA keyring on Debian/Ubuntu,
|
|
11
|
+
* pacman on Arch). The dnf and brew blocks are the plan's "flagged when
|
|
12
|
+
* untested" sets: they name the right packages but have not been run on a live
|
|
13
|
+
* host.
|
|
14
|
+
* @module dsh-plugin-local-infer/providers/systemDeps
|
|
15
|
+
*/
|
|
16
|
+
import type { HardwareProfile } from 'dsh-plugin-local-infer/core';
|
|
17
|
+
/**
|
|
18
|
+
* The named host deps every engine plan composes. The install blocks are the
|
|
19
|
+
* copy/paste commands the user runs; envAfter carries the per-manager export
|
|
20
|
+
* lines (the CUDA paths differ between Debian and Arch).
|
|
21
|
+
*/
|
|
22
|
+
export declare const SYSTEM_DEPS: {
|
|
23
|
+
cmake: {
|
|
24
|
+
id: string;
|
|
25
|
+
purpose: string;
|
|
26
|
+
requiresSudo: true;
|
|
27
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
28
|
+
install: {
|
|
29
|
+
apt: {
|
|
30
|
+
commands: string[];
|
|
31
|
+
};
|
|
32
|
+
dnf: {
|
|
33
|
+
commands: string[];
|
|
34
|
+
};
|
|
35
|
+
pacman: {
|
|
36
|
+
commands: string[];
|
|
37
|
+
};
|
|
38
|
+
brew: {
|
|
39
|
+
commands: string[];
|
|
40
|
+
};
|
|
41
|
+
winget: {
|
|
42
|
+
commands: string[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
ninja: {
|
|
47
|
+
id: string;
|
|
48
|
+
purpose: string;
|
|
49
|
+
requiresSudo: true;
|
|
50
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
51
|
+
install: {
|
|
52
|
+
apt: {
|
|
53
|
+
commands: string[];
|
|
54
|
+
};
|
|
55
|
+
dnf: {
|
|
56
|
+
commands: string[];
|
|
57
|
+
};
|
|
58
|
+
pacman: {
|
|
59
|
+
commands: string[];
|
|
60
|
+
};
|
|
61
|
+
brew: {
|
|
62
|
+
commands: string[];
|
|
63
|
+
};
|
|
64
|
+
winget: {
|
|
65
|
+
commands: string[];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
visualStudio: {
|
|
70
|
+
id: string;
|
|
71
|
+
purpose: string;
|
|
72
|
+
requiresSudo: false;
|
|
73
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
74
|
+
install: {
|
|
75
|
+
winget: {
|
|
76
|
+
commands: string[];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
pkgConfig: {
|
|
81
|
+
id: string;
|
|
82
|
+
purpose: string;
|
|
83
|
+
requiresSudo: true;
|
|
84
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
85
|
+
install: {
|
|
86
|
+
apt: {
|
|
87
|
+
commands: string[];
|
|
88
|
+
};
|
|
89
|
+
dnf: {
|
|
90
|
+
commands: string[];
|
|
91
|
+
};
|
|
92
|
+
pacman: {
|
|
93
|
+
commands: string[];
|
|
94
|
+
};
|
|
95
|
+
brew: {
|
|
96
|
+
commands: string[];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
ffmpeg: {
|
|
101
|
+
id: string;
|
|
102
|
+
purpose: string;
|
|
103
|
+
requiresSudo: true;
|
|
104
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
105
|
+
install: {
|
|
106
|
+
apt: {
|
|
107
|
+
commands: string[];
|
|
108
|
+
};
|
|
109
|
+
dnf: {
|
|
110
|
+
commands: string[];
|
|
111
|
+
};
|
|
112
|
+
pacman: {
|
|
113
|
+
commands: string[];
|
|
114
|
+
};
|
|
115
|
+
brew: {
|
|
116
|
+
commands: string[];
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
curl: {
|
|
121
|
+
id: string;
|
|
122
|
+
purpose: string;
|
|
123
|
+
requiresSudo: true;
|
|
124
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
125
|
+
install: {
|
|
126
|
+
apt: {
|
|
127
|
+
commands: string[];
|
|
128
|
+
};
|
|
129
|
+
dnf: {
|
|
130
|
+
commands: string[];
|
|
131
|
+
};
|
|
132
|
+
pacman: {
|
|
133
|
+
commands: string[];
|
|
134
|
+
};
|
|
135
|
+
brew: {
|
|
136
|
+
commands: string[];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
cudaToolkit: {
|
|
141
|
+
id: string;
|
|
142
|
+
purpose: string;
|
|
143
|
+
requiresSudo: true;
|
|
144
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
145
|
+
install: {
|
|
146
|
+
apt: {
|
|
147
|
+
commands: string[];
|
|
148
|
+
envAfter: {
|
|
149
|
+
CUDACXX: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
dnf: {
|
|
153
|
+
commands: string[];
|
|
154
|
+
envAfter: {
|
|
155
|
+
CUDACXX: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
pacman: {
|
|
159
|
+
commands: string[];
|
|
160
|
+
envAfter: {
|
|
161
|
+
CUDAToolkit_ROOT: string;
|
|
162
|
+
CUDACXX: string;
|
|
163
|
+
TORCH_CUDA_ARCH_LIST: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
brew: {
|
|
167
|
+
commands: string[];
|
|
168
|
+
envAfter: {
|
|
169
|
+
CUDACXX: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
winget: {
|
|
173
|
+
commands: string[];
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
compiler: {
|
|
178
|
+
id: string;
|
|
179
|
+
purpose: string;
|
|
180
|
+
requiresSudo: true;
|
|
181
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
182
|
+
install: {
|
|
183
|
+
apt: {
|
|
184
|
+
commands: string[];
|
|
185
|
+
};
|
|
186
|
+
dnf: {
|
|
187
|
+
commands: string[];
|
|
188
|
+
};
|
|
189
|
+
pacman: {
|
|
190
|
+
commands: string[];
|
|
191
|
+
};
|
|
192
|
+
brew: {
|
|
193
|
+
commands: string[];
|
|
194
|
+
};
|
|
195
|
+
winget: {
|
|
196
|
+
commands: never[];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
git: {
|
|
201
|
+
id: string;
|
|
202
|
+
purpose: string;
|
|
203
|
+
requiresSudo: true;
|
|
204
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
205
|
+
install: {
|
|
206
|
+
apt: {
|
|
207
|
+
commands: string[];
|
|
208
|
+
};
|
|
209
|
+
dnf: {
|
|
210
|
+
commands: string[];
|
|
211
|
+
};
|
|
212
|
+
pacman: {
|
|
213
|
+
commands: string[];
|
|
214
|
+
};
|
|
215
|
+
brew: {
|
|
216
|
+
commands: string[];
|
|
217
|
+
};
|
|
218
|
+
winget: {
|
|
219
|
+
commands: string[];
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
docker: {
|
|
224
|
+
id: string;
|
|
225
|
+
purpose: string;
|
|
226
|
+
requiresSudo: true;
|
|
227
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
228
|
+
install: {
|
|
229
|
+
apt: {
|
|
230
|
+
commands: string[];
|
|
231
|
+
};
|
|
232
|
+
dnf: {
|
|
233
|
+
commands: string[];
|
|
234
|
+
};
|
|
235
|
+
pacman: {
|
|
236
|
+
commands: string[];
|
|
237
|
+
};
|
|
238
|
+
brew: {
|
|
239
|
+
commands: string[];
|
|
240
|
+
};
|
|
241
|
+
winget: {
|
|
242
|
+
commands: string[];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
nvidiaContainerToolkit: {
|
|
247
|
+
id: string;
|
|
248
|
+
purpose: string;
|
|
249
|
+
requiresSudo: true;
|
|
250
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
251
|
+
install: {
|
|
252
|
+
apt: {
|
|
253
|
+
commands: string[];
|
|
254
|
+
};
|
|
255
|
+
dnf: {
|
|
256
|
+
commands: string[];
|
|
257
|
+
};
|
|
258
|
+
pacman: {
|
|
259
|
+
commands: string[];
|
|
260
|
+
};
|
|
261
|
+
brew: {
|
|
262
|
+
commands: never[];
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
hfCli: {
|
|
267
|
+
id: string;
|
|
268
|
+
purpose: string;
|
|
269
|
+
requiresSudo: false;
|
|
270
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
271
|
+
install: {
|
|
272
|
+
apt: {
|
|
273
|
+
commands: string[];
|
|
274
|
+
};
|
|
275
|
+
dnf: {
|
|
276
|
+
commands: string[];
|
|
277
|
+
};
|
|
278
|
+
pacman: {
|
|
279
|
+
commands: string[];
|
|
280
|
+
};
|
|
281
|
+
brew: {
|
|
282
|
+
commands: string[];
|
|
283
|
+
};
|
|
284
|
+
winget: {
|
|
285
|
+
commands: string[];
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
basaltPip: {
|
|
290
|
+
id: string;
|
|
291
|
+
purpose: string;
|
|
292
|
+
requiresSudo: true;
|
|
293
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
294
|
+
install: {
|
|
295
|
+
apt: {
|
|
296
|
+
commands: string[];
|
|
297
|
+
};
|
|
298
|
+
dnf: {
|
|
299
|
+
commands: string[];
|
|
300
|
+
};
|
|
301
|
+
pacman: {
|
|
302
|
+
commands: string[];
|
|
303
|
+
};
|
|
304
|
+
brew: {
|
|
305
|
+
commands: string[];
|
|
306
|
+
};
|
|
307
|
+
winget: {
|
|
308
|
+
commands: string[];
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
//# sourceMappingURL=systemDeps.d.ts.map
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared SystemDep install command catalog. Every engine OS profile and
|
|
3
|
+
* the per-engine dep plans compose their lists from these named deps, so the
|
|
4
|
+
* install blocks (the copy/paste commands the user runs) and the which/version
|
|
5
|
+
* probes have one home. The engine OS profiles import this catalog directly,
|
|
6
|
+
* which keeps them free of a circular edge back through the per-engine plans.
|
|
7
|
+
*
|
|
8
|
+
* Each dep declares its purpose, the which/version probe that reads "already
|
|
9
|
+
* installed", and its install block keyed by package manager, mirroring the
|
|
10
|
+
* qwen-ninfer launcher header (apt and the CUDA keyring on Debian/Ubuntu,
|
|
11
|
+
* pacman on Arch). The dnf and brew blocks are the plan's "flagged when
|
|
12
|
+
* untested" sets: they name the right packages but have not been run on a live
|
|
13
|
+
* host.
|
|
14
|
+
* @module dsh-plugin-local-infer/providers/systemDeps
|
|
15
|
+
*/
|
|
16
|
+
import { execFile } from 'node:child_process';
|
|
17
|
+
/**
|
|
18
|
+
* The probe timeout. A hung version probe must not hang the panel, so every
|
|
19
|
+
* detect command is killed after this many milliseconds and read as missing.
|
|
20
|
+
*/
|
|
21
|
+
const PROBE_TIMEOUT_MS = 5000;
|
|
22
|
+
/**
|
|
23
|
+
* probe builds a dep's detect function from a binary and its version args.
|
|
24
|
+
* A missing binary, a non-zero exit, and a timeout all read as not installed,
|
|
25
|
+
* which the checkDeps rule degrades to the missing status.
|
|
26
|
+
*/
|
|
27
|
+
function probe(binary, args) {
|
|
28
|
+
return async (_hw) => {
|
|
29
|
+
try {
|
|
30
|
+
await execFile(binary, args, { timeout: PROBE_TIMEOUT_MS });
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The named host deps every engine plan composes. The install blocks are the
|
|
40
|
+
* copy/paste commands the user runs; envAfter carries the per-manager export
|
|
41
|
+
* lines (the CUDA paths differ between Debian and Arch).
|
|
42
|
+
*/
|
|
43
|
+
export const SYSTEM_DEPS = {
|
|
44
|
+
cmake: {
|
|
45
|
+
id: 'cmake',
|
|
46
|
+
purpose: 'compiles the local engine',
|
|
47
|
+
requiresSudo: true,
|
|
48
|
+
detect: probe('cmake', ['--version']),
|
|
49
|
+
install: {
|
|
50
|
+
apt: { commands: ['sudo apt install cmake'] },
|
|
51
|
+
dnf: { commands: ['sudo dnf install cmake'] },
|
|
52
|
+
pacman: { commands: ['sudo pacman -S --noconfirm cmake'] },
|
|
53
|
+
brew: { commands: ['brew install cmake'] },
|
|
54
|
+
winget: { commands: ['winget install Kitware.CMake'] },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
ninja: {
|
|
58
|
+
id: 'ninja',
|
|
59
|
+
purpose: 'drives the cmake build',
|
|
60
|
+
requiresSudo: true,
|
|
61
|
+
detect: probe('ninja', ['--version']),
|
|
62
|
+
install: {
|
|
63
|
+
apt: { commands: ['sudo apt install ninja-build'] },
|
|
64
|
+
dnf: { commands: ['sudo dnf install ninja'] },
|
|
65
|
+
pacman: { commands: ['sudo pacman -S --noconfirm ninja'] },
|
|
66
|
+
brew: { commands: ['brew install ninja'] },
|
|
67
|
+
winget: { commands: ['winget install -e --id Ninja-build.Ninja'] },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
// The MSVC compiler the Windows vcpkg build links against. The winget block
|
|
71
|
+
// installs the Community edition with the C++ workload the build needs. The
|
|
72
|
+
// probe reads the cl compiler, which is on the path only inside a Visual
|
|
73
|
+
// Studio developer prompt, so a plain shell degrades to missing and the
|
|
74
|
+
// user installs by hand.
|
|
75
|
+
visualStudio: {
|
|
76
|
+
id: 'visual-studio',
|
|
77
|
+
purpose: 'provides the MSVC compiler the vcpkg build needs',
|
|
78
|
+
requiresSudo: false,
|
|
79
|
+
detect: probe('where', ['cl']),
|
|
80
|
+
install: {
|
|
81
|
+
// The MSVC C++ workload the Windows Basalt build needs. Untested on a
|
|
82
|
+
// live host, so it rides the plan's "flagged when untested" rule.
|
|
83
|
+
winget: {
|
|
84
|
+
commands: [
|
|
85
|
+
'winget install --id Microsoft.VisualStudio.Community --override "--passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"',
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
pkgConfig: {
|
|
91
|
+
id: 'pkg-config',
|
|
92
|
+
purpose: 'links the ffmpeg and curl dev libraries',
|
|
93
|
+
requiresSudo: true,
|
|
94
|
+
detect: probe('pkg-config', ['--version']),
|
|
95
|
+
install: {
|
|
96
|
+
apt: { commands: ['sudo apt install pkg-config'] },
|
|
97
|
+
dnf: { commands: ['sudo dnf install pkgconf-pkg-config'] },
|
|
98
|
+
pacman: { commands: ['sudo pacman -S --noconfirm pkgconf'] },
|
|
99
|
+
brew: { commands: ['brew install pkgconf'] },
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
ffmpeg: {
|
|
103
|
+
id: 'ffmpeg',
|
|
104
|
+
purpose: 'links the media codecs the vision tower needs',
|
|
105
|
+
requiresSudo: true,
|
|
106
|
+
detect: probe('ffmpeg', ['-version']),
|
|
107
|
+
install: {
|
|
108
|
+
apt: {
|
|
109
|
+
commands: ['sudo apt install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev'],
|
|
110
|
+
},
|
|
111
|
+
dnf: { commands: ['sudo dnf install ffmpeg-devel'] },
|
|
112
|
+
pacman: { commands: ['sudo pacman -S --noconfirm ffmpeg'] },
|
|
113
|
+
brew: { commands: ['brew install ffmpeg'] },
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
curl: {
|
|
117
|
+
id: 'curl',
|
|
118
|
+
purpose: 'links the HTTP client dev headers',
|
|
119
|
+
requiresSudo: true,
|
|
120
|
+
detect: probe('curl', ['--version']),
|
|
121
|
+
install: {
|
|
122
|
+
apt: { commands: ['sudo apt install libcurl4-openssl-dev'] },
|
|
123
|
+
dnf: { commands: ['sudo dnf install libcurl-devel'] },
|
|
124
|
+
pacman: { commands: ['sudo pacman -S --noconfirm curl'] },
|
|
125
|
+
brew: { commands: ['brew install curl'] },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
// The CUDA 13 toolkit the Blackwell-only Basalt build needs. None of the
|
|
129
|
+
// manager blocks below has been run on a live host, so each rides the
|
|
130
|
+
// plan's "flagged when untested" rule: a later live-host run confirms the
|
|
131
|
+
// exact package names.
|
|
132
|
+
cudaToolkit: {
|
|
133
|
+
id: 'cuda-toolkit',
|
|
134
|
+
purpose: 'compiles the CUDA kernels',
|
|
135
|
+
requiresSudo: true,
|
|
136
|
+
detect: probe('nvcc', ['--version']),
|
|
137
|
+
install: {
|
|
138
|
+
// The qwen-ninfer header, verbatim: the ubuntu2604 CUDA keyring plus the
|
|
139
|
+
// toolkit, then the nvcc export the build reads.
|
|
140
|
+
apt: {
|
|
141
|
+
commands: [
|
|
142
|
+
'wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2604/x86_64/cuda-keyring_1.1-1_all.deb',
|
|
143
|
+
'sudo dpkg -i cuda-keyring_1.1-1_all.deb',
|
|
144
|
+
'sudo apt-get update',
|
|
145
|
+
'sudo apt-get -y install cuda-toolkit-13-4',
|
|
146
|
+
],
|
|
147
|
+
envAfter: { CUDACXX: '/usr/local/cuda/bin/nvcc' },
|
|
148
|
+
},
|
|
149
|
+
dnf: {
|
|
150
|
+
commands: ['sudo dnf install cuda-toolkit'],
|
|
151
|
+
envAfter: { CUDACXX: '/usr/bin/nvcc' },
|
|
152
|
+
},
|
|
153
|
+
pacman: {
|
|
154
|
+
commands: ['sudo pacman -S --noconfirm cuda'],
|
|
155
|
+
envAfter: {
|
|
156
|
+
CUDAToolkit_ROOT: '/opt/cuda',
|
|
157
|
+
CUDACXX: '/opt/cuda/bin/nvcc',
|
|
158
|
+
TORCH_CUDA_ARCH_LIST: '12.0',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
brew: {
|
|
162
|
+
commands: ['brew install --cask nvidia-cuda'],
|
|
163
|
+
envAfter: { CUDACXX: '/usr/local/cuda/bin/nvcc' },
|
|
164
|
+
},
|
|
165
|
+
// The NVIDIA CUDA toolkit the winget catalog ships. The build reads the
|
|
166
|
+
// toolkit from the default install path, so no envAfter export is needed.
|
|
167
|
+
winget: { commands: ['winget install --id=Nvidia.CUDA -e'] },
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
// The C++20 compiler the local build links against (GCC on Debian/Arch/
|
|
171
|
+
// Fedora, Clang on macOS). The winget block is empty: on Windows the C++20
|
|
172
|
+
// compiler is the MSVC toolchain the visual-studio dep installs, so the
|
|
173
|
+
// Windows profile rides that dep instead of this one.
|
|
174
|
+
compiler: {
|
|
175
|
+
id: 'compiler',
|
|
176
|
+
purpose: 'compiles the C++20 engine sources',
|
|
177
|
+
requiresSudo: true,
|
|
178
|
+
detect: probe('g++', ['--version']),
|
|
179
|
+
install: {
|
|
180
|
+
apt: { commands: ['sudo apt install g++'] },
|
|
181
|
+
dnf: { commands: ['sudo dnf install gcc-c++'] },
|
|
182
|
+
pacman: { commands: ['sudo pacman -S --noconfirm gcc'] },
|
|
183
|
+
brew: { commands: ['brew install gcc'] },
|
|
184
|
+
winget: { commands: [] },
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
git: {
|
|
188
|
+
id: 'git',
|
|
189
|
+
purpose: 'clones the engine source',
|
|
190
|
+
requiresSudo: true,
|
|
191
|
+
detect: probe('git', ['--version']),
|
|
192
|
+
install: {
|
|
193
|
+
apt: { commands: ['sudo apt install git'] },
|
|
194
|
+
dnf: { commands: ['sudo dnf install git'] },
|
|
195
|
+
pacman: { commands: ['sudo pacman -S --noconfirm git'] },
|
|
196
|
+
brew: { commands: ['brew install git'] },
|
|
197
|
+
winget: { commands: ['winget install Git.Git'] },
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
docker: {
|
|
201
|
+
id: 'docker',
|
|
202
|
+
purpose: 'runs the engine in a container',
|
|
203
|
+
requiresSudo: true,
|
|
204
|
+
detect: probe('docker', ['--version']),
|
|
205
|
+
install: {
|
|
206
|
+
apt: { commands: ['sudo apt install docker.io'] },
|
|
207
|
+
dnf: { commands: ['sudo dnf install docker'] },
|
|
208
|
+
pacman: { commands: ['sudo pacman -S --noconfirm docker'] },
|
|
209
|
+
brew: { commands: ['brew install --cask docker'] },
|
|
210
|
+
winget: { commands: ['winget install Docker.Docker-Desktop'] },
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
nvidiaContainerToolkit: {
|
|
214
|
+
id: 'nvidia-container-toolkit',
|
|
215
|
+
purpose: 'lets the container see the GPU',
|
|
216
|
+
requiresSudo: true,
|
|
217
|
+
detect: probe('nvidia-ctk', ['--version']),
|
|
218
|
+
install: {
|
|
219
|
+
// The NVIDIA-published apt setup. Untested on a live host, so it rides
|
|
220
|
+
// the plan's "flagged when untested" rule.
|
|
221
|
+
apt: {
|
|
222
|
+
commands: [
|
|
223
|
+
'curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg',
|
|
224
|
+
'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',
|
|
225
|
+
'sudo apt-get update',
|
|
226
|
+
'sudo apt-get install -y nvidia-container-toolkit',
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
dnf: { commands: ['sudo dnf install nvidia-container-toolkit'] },
|
|
230
|
+
pacman: { commands: ['sudo pacman -S --noconfirm nvidia-container-toolkit'] },
|
|
231
|
+
// macOS has no NVIDIA GPU toolkit; the by-hand note renders instead.
|
|
232
|
+
brew: { commands: [] },
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
hfCli: {
|
|
236
|
+
id: 'hf-cli',
|
|
237
|
+
purpose: 'downloads the model artifact',
|
|
238
|
+
requiresSudo: false,
|
|
239
|
+
detect: probe('hf', ['--version']),
|
|
240
|
+
install: {
|
|
241
|
+
// The hf CLI installs through its own script, not a package manager, so
|
|
242
|
+
// every manager keys the same block. Windows runs the PowerShell
|
|
243
|
+
// installer through the OS's own irm alias.
|
|
244
|
+
apt: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
245
|
+
dnf: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
246
|
+
pacman: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
247
|
+
brew: { commands: ['curl -LsSf https://hf.co/cli/install.sh | bash'] },
|
|
248
|
+
winget: {
|
|
249
|
+
commands: ['powershell -ExecutionPolicy ByPass -c "irm https://hf.co/cli/install.ps1 | iex"'],
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
// The Python packages the Basalt serve/ server imports (numpy, jinja2,
|
|
254
|
+
// regex, pyyaml, tqdm, pillow, psutil). The C++ basalt binary launches the
|
|
255
|
+
// Python server, which fails at import when a module is missing, so the
|
|
256
|
+
// launch reads as a 120-attempt health-poll timeout. The serve CLI resolves
|
|
257
|
+
// its python as <src_dir>/.venv/bin/python if present, else the system
|
|
258
|
+
// python3 (python_interpreter in src/platform/system.cpp), so the probe and
|
|
259
|
+
// install target the system python the CLI falls back to. The probe imports
|
|
260
|
+
// the modules the server needs; the install pulls them through pip. The
|
|
261
|
+
// install bootstraps pip through the package manager (python3-pip on
|
|
262
|
+
// apt/dnf, python-pip on pacman) first, because the system python3 may lack
|
|
263
|
+
// the pip module (Arch without python-pip).
|
|
264
|
+
basaltPip: {
|
|
265
|
+
id: 'basalt-pip',
|
|
266
|
+
purpose: 'installs the Basalt serve server Python requirements',
|
|
267
|
+
requiresSudo: true,
|
|
268
|
+
detect: probe('python3', ['-c', 'import regex, numpy, jinja2, yaml, tqdm, PIL, psutil']),
|
|
269
|
+
install: {
|
|
270
|
+
// PEP 668: on Arch / CachyOS, Debian 12+, and Ubuntu 23.04+ the system
|
|
271
|
+
// python3 is externally managed, so the pip install passes
|
|
272
|
+
// --break-system-packages. The brew and winget interpreters are not
|
|
273
|
+
// externally managed, so they run the plain install.
|
|
274
|
+
apt: { commands: ['sudo apt-get install -y python3-pip && sudo python3 -m pip install --break-system-packages numpy jinja2 markupsafe regex pyyaml tqdm pillow psutil'] },
|
|
275
|
+
dnf: { commands: ['sudo dnf install -y python3-pip && sudo python3 -m pip install --break-system-packages numpy jinja2 markupsafe regex pyyaml tqdm pillow psutil'] },
|
|
276
|
+
pacman: { commands: ['sudo pacman -S --noconfirm python-pip && sudo python3 -m pip install --break-system-packages numpy jinja2 markupsafe regex pyyaml tqdm pillow psutil'] },
|
|
277
|
+
brew: { commands: ['python3 -m pip install numpy jinja2 markupsafe regex pyyaml tqdm pillow psutil'] },
|
|
278
|
+
// The Windows interpreter is python, not python3, so the winget host
|
|
279
|
+
// installs through the python alias the OS ships.
|
|
280
|
+
winget: { commands: ['python -m pip install numpy jinja2 markupsafe regex pyyaml tqdm pillow psutil'] },
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
//# sourceMappingURL=systemDeps.js.map
|