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/sandbox-image.js
CHANGED
|
@@ -4952,25 +4952,25 @@ async function runCreateSandboxImageCli(argv = process.argv.slice(2)) {
|
|
|
4952
4952
|
name: { type: "string", short: "n" },
|
|
4953
4953
|
cpus: { type: "string" },
|
|
4954
4954
|
memory: { type: "string" },
|
|
4955
|
-
|
|
4955
|
+
disk_mb: { type: "string" },
|
|
4956
4956
|
public: { type: "boolean", default: false }
|
|
4957
4957
|
}
|
|
4958
4958
|
});
|
|
4959
4959
|
const dockerfilePath = parsed.positionals[0];
|
|
4960
4960
|
if (!dockerfilePath) {
|
|
4961
|
-
throw new Error("Usage: tensorlake-create-sandbox-image <dockerfile_path> [--name NAME] [--cpus N] [--memory MB] [--
|
|
4961
|
+
throw new Error("Usage: tensorlake-create-sandbox-image <dockerfile_path> [--name NAME] [--cpus N] [--memory MB] [--disk_mb MB] [--public]");
|
|
4962
4962
|
}
|
|
4963
4963
|
const cpus = parsed.values.cpus != null ? Number(parsed.values.cpus) : void 0;
|
|
4964
4964
|
const memoryMb = parsed.values.memory != null ? Number(parsed.values.memory) : void 0;
|
|
4965
|
-
const
|
|
4965
|
+
const diskMb = parsed.values.disk_mb != null ? Number(parsed.values.disk_mb) : void 0;
|
|
4966
4966
|
if (cpus != null && !Number.isFinite(cpus)) {
|
|
4967
4967
|
throw new Error(`Invalid --cpus value: ${parsed.values.cpus}`);
|
|
4968
4968
|
}
|
|
4969
4969
|
if (memoryMb != null && !Number.isInteger(memoryMb)) {
|
|
4970
4970
|
throw new Error(`Invalid --memory value: ${parsed.values.memory}`);
|
|
4971
4971
|
}
|
|
4972
|
-
if (
|
|
4973
|
-
throw new Error(`Invalid --
|
|
4972
|
+
if (diskMb != null && !Number.isInteger(diskMb)) {
|
|
4973
|
+
throw new Error(`Invalid --disk_mb value: ${parsed.values.disk_mb}`);
|
|
4974
4974
|
}
|
|
4975
4975
|
await createSandboxImage(
|
|
4976
4976
|
dockerfilePath,
|
|
@@ -4978,7 +4978,7 @@ async function runCreateSandboxImageCli(argv = process.argv.slice(2)) {
|
|
|
4978
4978
|
registeredName: parsed.values.name,
|
|
4979
4979
|
cpus,
|
|
4980
4980
|
memoryMb,
|
|
4981
|
-
diskMb
|
|
4981
|
+
diskMb,
|
|
4982
4982
|
isPublic: parsed.values.public
|
|
4983
4983
|
},
|
|
4984
4984
|
{ emit: ndjsonStdoutEmit }
|