cassian-cli 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.js +14 -8
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/commands/init.d.ts
CHANGED
package/dist/commands/init.js
CHANGED
|
@@ -53,7 +53,7 @@ export async function init(options = {}) {
|
|
|
53
53
|
gpuType: options.gpu || "rtx3090",
|
|
54
54
|
gpuCount: parseInt(options.gpuCount || "1"),
|
|
55
55
|
diskSize: options.disk || "50G",
|
|
56
|
-
storage: true,
|
|
56
|
+
storage: options.storage === true,
|
|
57
57
|
exclude: ["node_modules/", ".venv/", "__pycache__/", "*.pyc", "wandb/"],
|
|
58
58
|
});
|
|
59
59
|
writeFileSync("cassian.yaml", yaml);
|
|
@@ -127,13 +127,19 @@ export async function init(options = {}) {
|
|
|
127
127
|
p.cancel("Setup cancelled.");
|
|
128
128
|
process.exit(0);
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
p.
|
|
136
|
-
|
|
130
|
+
let storageEnabled;
|
|
131
|
+
if (options.storage !== undefined) {
|
|
132
|
+
storageEnabled = options.storage;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
storageEnabled = await p.confirm({
|
|
136
|
+
message: "Enable cloud storage? \x1b[90m(unlimited, persists at /workspace/storage)\x1b[0m",
|
|
137
|
+
initialValue: false,
|
|
138
|
+
});
|
|
139
|
+
if (p.isCancel(storageEnabled)) {
|
|
140
|
+
p.cancel("Setup cancelled.");
|
|
141
|
+
process.exit(0);
|
|
142
|
+
}
|
|
137
143
|
}
|
|
138
144
|
const excludeRaw = await p.text({
|
|
139
145
|
message: "Exclude patterns \x1b[90m(comma-separated, not persisted)\x1b[0m",
|
package/dist/index.js
CHANGED
|
@@ -88,12 +88,14 @@ program
|
|
|
88
88
|
.option("--gpu <type>", "GPU type (e.g. h100-sxm, a100-sxm, rtx3090)")
|
|
89
89
|
.option("--gpu-count <n>", "Number of GPUs")
|
|
90
90
|
.option("--disk <size>", "Disk size (e.g. 50G, 200G)")
|
|
91
|
+
.option("--cloud-storage", "Enable cloud storage at /workspace/storage")
|
|
91
92
|
.option("-y, --yes", "Skip all prompts, use defaults")
|
|
92
93
|
.action((opts) => init({
|
|
93
94
|
name: opts.name,
|
|
94
95
|
gpu: opts.gpu,
|
|
95
96
|
gpuCount: opts.gpuCount,
|
|
96
97
|
disk: opts.disk,
|
|
98
|
+
storage: opts.cloudStorage,
|
|
97
99
|
yes: opts.yes,
|
|
98
100
|
}));
|
|
99
101
|
program.parse();
|