tensorlake 0.5.2 → 0.5.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.
- package/dist/bin/darwin-arm64/tensorlake +0 -0
- package/dist/bin/darwin-arm64/tl +0 -0
- package/dist/bin/linux-x64/tensorlake +0 -0
- package/dist/bin/linux-x64/tl +0 -0
- package/dist/bin/win32-x64/tensorlake.exe +0 -0
- package/dist/bin/win32-x64/tl.exe +0 -0
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/sandbox-image.cjs +6 -6
- package/dist/sandbox-image.cjs.map +1 -1
- package/dist/sandbox-image.js +6 -6
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5116,25 +5116,25 @@ async function runCreateSandboxImageCli(argv = process.argv.slice(2)) {
|
|
|
5116
5116
|
name: { type: "string", short: "n" },
|
|
5117
5117
|
cpus: { type: "string" },
|
|
5118
5118
|
memory: { type: "string" },
|
|
5119
|
-
|
|
5119
|
+
disk_mb: { type: "string" },
|
|
5120
5120
|
public: { type: "boolean", default: false }
|
|
5121
5121
|
}
|
|
5122
5122
|
});
|
|
5123
5123
|
const dockerfilePath = parsed.positionals[0];
|
|
5124
5124
|
if (!dockerfilePath) {
|
|
5125
|
-
throw new Error("Usage: tensorlake-create-sandbox-image <dockerfile_path> [--name NAME] [--cpus N] [--memory MB] [--
|
|
5125
|
+
throw new Error("Usage: tensorlake-create-sandbox-image <dockerfile_path> [--name NAME] [--cpus N] [--memory MB] [--disk_mb MB] [--public]");
|
|
5126
5126
|
}
|
|
5127
5127
|
const cpus = parsed.values.cpus != null ? Number(parsed.values.cpus) : void 0;
|
|
5128
5128
|
const memoryMb = parsed.values.memory != null ? Number(parsed.values.memory) : void 0;
|
|
5129
|
-
const
|
|
5129
|
+
const diskMb = parsed.values.disk_mb != null ? Number(parsed.values.disk_mb) : void 0;
|
|
5130
5130
|
if (cpus != null && !Number.isFinite(cpus)) {
|
|
5131
5131
|
throw new Error(`Invalid --cpus value: ${parsed.values.cpus}`);
|
|
5132
5132
|
}
|
|
5133
5133
|
if (memoryMb != null && !Number.isInteger(memoryMb)) {
|
|
5134
5134
|
throw new Error(`Invalid --memory value: ${parsed.values.memory}`);
|
|
5135
5135
|
}
|
|
5136
|
-
if (
|
|
5137
|
-
throw new Error(`Invalid --
|
|
5136
|
+
if (diskMb != null && !Number.isInteger(diskMb)) {
|
|
5137
|
+
throw new Error(`Invalid --disk_mb value: ${parsed.values.disk_mb}`);
|
|
5138
5138
|
}
|
|
5139
5139
|
await createSandboxImage(
|
|
5140
5140
|
dockerfilePath,
|
|
@@ -5142,7 +5142,7 @@ async function runCreateSandboxImageCli(argv = process.argv.slice(2)) {
|
|
|
5142
5142
|
registeredName: parsed.values.name,
|
|
5143
5143
|
cpus,
|
|
5144
5144
|
memoryMb,
|
|
5145
|
-
diskMb
|
|
5145
|
+
diskMb,
|
|
5146
5146
|
isPublic: parsed.values.public
|
|
5147
5147
|
},
|
|
5148
5148
|
{ emit: ndjsonStdoutEmit }
|