@animastor/installer 0.1.1 → 0.2.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 +89 -1
- package/ai/install-manifests/audio/qwen-tts.json +6 -7
- package/package.json +3 -3
- package/src/installer/cli.js +1034 -209
- package/src/installer/compatibility-resolver.js +58 -11
- package/src/installer/engine/comfy-owner.js +385 -0
- package/src/installer/engine/downloader.js +26 -0
- package/src/installer/engine/engine.js +454 -60
- package/src/installer/engine/fixes.js +96 -0
- package/src/installer/engine/io.js +33 -2
- package/src/installer/engine/node-deps.js +274 -0
- package/src/installer/engine/prereq.js +176 -0
- package/src/installer/engine/probe.js +265 -8
- package/src/installer/engine/summary.js +108 -0
- package/src/installer/engine/tty.js +214 -0
- package/src/installer/engine/worker.js +379 -47
- package/src/installer/install-plan.js +99 -15
- package/src/installer/management.js +336 -12
- package/src/installer/platform/linux.js +17 -0
- package/src/installer/setup-contract.js +35 -23
- package/src/installer/verification-report.js +3 -1
|
@@ -56,24 +56,23 @@ function getInstallerVersion() {
|
|
|
56
56
|
* package.json. Checks baked-in artifacts first (container), then
|
|
57
57
|
* repo checkout (development), then hub probe (network).
|
|
58
58
|
*/
|
|
59
|
-
function getWorkerBundleVersion() {
|
|
60
|
-
// Priority: baked-in >
|
|
59
|
+
function getWorkerBundleVersion(bundleDir) {
|
|
60
|
+
// Priority: baked-in > explicit bundleDir (test fixture) > repo checkout > null
|
|
61
|
+
// (hub probe is primary source). bundleDir lets tests inject a synthetic
|
|
62
|
+
// worker bundle instead of depending on packages/animastor-worker, which
|
|
63
|
+
// lives in the worker repo post-split.
|
|
61
64
|
const bakedIn = path.join('/app', 'artifacts', 'worker-bundle', 'package.json');
|
|
62
65
|
try {
|
|
63
66
|
const pkg = JSON.parse(fs.readFileSync(bakedIn, 'utf8'));
|
|
64
67
|
if (typeof pkg.version === 'string' && pkg.version) return pkg.version;
|
|
65
68
|
} catch (_) { /* not in container */ }
|
|
66
69
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const candidates = [
|
|
74
|
-
path.join(__dirname, '..', '..', '..', '..', 'packages', 'animastor-worker', 'worker', 'package.json'),
|
|
75
|
-
path.join(__dirname, '..', '..', '..', '..', 'worker', 'worker', 'package.json'),
|
|
76
|
-
];
|
|
70
|
+
const candidates = bundleDir
|
|
71
|
+
? [path.join(bundleDir, 'package.json')]
|
|
72
|
+
: [
|
|
73
|
+
path.join(__dirname, '..', '..', '..', '..', 'packages', 'animastor-worker', 'worker', 'package.json'),
|
|
74
|
+
path.join(__dirname, '..', '..', '..', '..', 'worker', 'worker', 'package.json'),
|
|
75
|
+
];
|
|
77
76
|
for (const file of candidates) {
|
|
78
77
|
try {
|
|
79
78
|
const pkg = JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
@@ -692,7 +691,7 @@ function dockerContainerSteps({ profileIds, mode, hubUrl }) {
|
|
|
692
691
|
id: 'docker-build',
|
|
693
692
|
title: 'Build the worker image',
|
|
694
693
|
body: 'Clone the Animastor repository and build the worker image from its canonical Dockerfile (the image runs the universal installer in docker deployment).',
|
|
695
|
-
code: 'git clone https://github.com/Animastor/animastor.git\ncd animastor\ndocker build -t animastor-worker -f docker/worker/Dockerfile docker/worker',
|
|
694
|
+
code: 'git clone https://github.com/Animastor/animastor-worker.git\ncd animastor-worker\ndocker build -t animastor-worker -f docker/worker/Dockerfile docker/worker',
|
|
696
695
|
});
|
|
697
696
|
steps.push({
|
|
698
697
|
id: 'docker-install',
|
|
@@ -926,7 +925,10 @@ function buildInstructions({
|
|
|
926
925
|
status: artifacts.installer.status || 'available',
|
|
927
926
|
download_url: bootstrapUrl,
|
|
928
927
|
};
|
|
929
|
-
|
|
928
|
+
// The installer links the `animastor` command into ~/.local/bin (root
|
|
929
|
+
// included) and persists that directory in ~/.bashrc / ~/.profile; the
|
|
930
|
+
// tools-dir path works without PATH too.
|
|
931
|
+
response.verify_command = 'animastor status # or: $HOME/animastor/tools/animastor status';
|
|
930
932
|
|
|
931
933
|
if (target.deployment === 'docker') {
|
|
932
934
|
// Docker deployment (linux platform) — the canonical container flow
|
|
@@ -1028,18 +1030,16 @@ function buildInstructions({
|
|
|
1028
1030
|
code: 'powershell -ExecutionPolicy Bypass -File .\\animastor-installer.ps1',
|
|
1029
1031
|
});
|
|
1030
1032
|
} else {
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
});
|
|
1037
|
-
|
|
1033
|
+
// ONE command. The URL is quoted: unquoted, the shell treats every
|
|
1034
|
+
// `&` in the query as "run in background" and the profile/mode/
|
|
1035
|
+
// platform parameters are silently lost. The installer reads its
|
|
1036
|
+
// questions (and the hidden Worker Key) from /dev/tty, so piping the
|
|
1037
|
+
// script into bash is the supported way to run it.
|
|
1038
1038
|
steps.push({
|
|
1039
1039
|
id: 'run-bootstrap',
|
|
1040
1040
|
title: 'Run the installer',
|
|
1041
|
-
body:
|
|
1042
|
-
code:
|
|
1041
|
+
body: `Run this one command in a terminal on the GPU machine (installer version ${artifacts.installer.version}). The profile and connection mode you selected here are already embedded. The installer checks the machine, installs only what is missing, asks for the Worker Key (hidden input — paste the key saved above) and finishes with a ✓/✗ summary.`,
|
|
1042
|
+
code: bootstrapOneLiner(bootstrapUrl),
|
|
1043
1043
|
});
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
@@ -1052,6 +1052,17 @@ function buildInstructions({
|
|
|
1052
1052
|
return response;
|
|
1053
1053
|
}
|
|
1054
1054
|
|
|
1055
|
+
/**
|
|
1056
|
+
* The Linux install command: `curl -fsSL "<url>" | bash`. The URL is always
|
|
1057
|
+
* double-quoted (it carries `&`-separated query parameters); a URL that
|
|
1058
|
+
* could break out of the quotes is refused rather than emitted.
|
|
1059
|
+
*/
|
|
1060
|
+
function bootstrapOneLiner(url) {
|
|
1061
|
+
const u = String(url || '');
|
|
1062
|
+
if (!u || /["`$\\\s]/.test(u)) throw new Error('bootstrap URL contains characters that cannot be quoted safely');
|
|
1063
|
+
return `curl -fsSL "${u}" | bash`;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1055
1066
|
// ---------------------------------------------------------------------------
|
|
1056
1067
|
// Worker status adapter & capabilities normalization
|
|
1057
1068
|
// ---------------------------------------------------------------------------
|
|
@@ -1371,6 +1382,7 @@ function buildSetupPlan({ profileIds, mode, platform = 'linux', deployment = 'na
|
|
|
1371
1382
|
}
|
|
1372
1383
|
|
|
1373
1384
|
module.exports = {
|
|
1385
|
+
bootstrapOneLiner,
|
|
1374
1386
|
PLATFORMS,
|
|
1375
1387
|
OS_PLATFORMS,
|
|
1376
1388
|
DEPLOYMENTS,
|
|
@@ -84,11 +84,13 @@ function buildVerificationReport({ report, live = {} }) {
|
|
|
84
84
|
throw new Error('buildVerificationReport requires a resolution report');
|
|
85
85
|
}
|
|
86
86
|
const lines = [];
|
|
87
|
+
const checks = [];
|
|
87
88
|
let fails = 0;
|
|
88
89
|
let warns = 0;
|
|
89
90
|
|
|
90
91
|
const push = (verdict, label, detail) => {
|
|
91
92
|
lines.push(line(verdict, label, detail));
|
|
93
|
+
checks.push({ verdict, label, detail: detail || null });
|
|
92
94
|
if (verdict === false) fails += 1;
|
|
93
95
|
else if (verdict === null) warns += 1;
|
|
94
96
|
};
|
|
@@ -212,7 +214,7 @@ function buildVerificationReport({ report, live = {} }) {
|
|
|
212
214
|
: 'INSTALLATION INCOMPLETE';
|
|
213
215
|
|
|
214
216
|
const text = [header, '', ...lines].join('\n');
|
|
215
|
-
return { status, fails, warns, lines, text };
|
|
217
|
+
return { status, fails, warns, lines, checks, text };
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
module.exports = {
|