cassian-cli 0.1.2 → 0.1.3

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.
@@ -100,6 +100,20 @@ export async function up() {
100
100
  await new Promise((r) => setTimeout(r, 1000));
101
101
  spinner.text = "Starting instance...";
102
102
  }
103
+ // Validate GPU type against what the host offers before provisioning
104
+ if (config.gpu.type) {
105
+ const gpus = await client.get("/v1/gpus").catch(() => null);
106
+ if (gpus && gpus.gpus.length > 0) {
107
+ const available = gpus.gpus[0].name.toLowerCase().replace(/[\s_]/g, "-");
108
+ const requested = config.gpu.type.toLowerCase().replace(/[\s_]/g, "-");
109
+ // Check if the requested type is a substring match of what's available
110
+ if (!available.includes(requested) && !requested.includes(available.split("-").pop())) {
111
+ spinner.fail("GPU type not available");
112
+ const names = [...new Set(gpus.gpus.map((g) => g.name))];
113
+ fatal(`GPU type '${config.gpu.type}' is not available on this host.`, `Available: ${names.join(", ")} — update gpu.type in cassian.yaml`);
114
+ }
115
+ }
116
+ }
103
117
  const instance = await client.post("/v1/instances", {
104
118
  name: config.name,
105
119
  gpu_count: config.gpu.count,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cassian-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "The Cassian GPU cloud CLI — provision GPUs, sync files, and run workloads from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {