disk 1.10.0 → 1.12.0
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 +8 -0
- package/dist/archil-CLQrudfP.d.cts +1581 -0
- package/dist/archil-CLQrudfP.d.mts +1581 -0
- package/dist/cli.mjs +2 -3
- package/dist/index.cjs +257 -73
- package/dist/index.d.cts +2 -695
- package/dist/index.d.mts +2 -695
- package/dist/index.mjs +1 -1
- package/dist/internal/tools.d.cts +1 -1
- package/dist/internal/tools.d.mts +1 -1
- package/dist/sandbox-cli.mjs +5 -10
- package/dist/{sandbox-options-DV7SSadf.mjs → sandbox-options-Cz_oVr-y.mjs} +375 -21
- package/dist/{src-BND_QqPx.mjs → src-V9HdQW-c.mjs} +257 -51
- package/package.json +12 -9
- package/dist/disk-DZkPOSQD.d.cts +0 -784
- package/dist/disk-DZkPOSQD.d.mts +0 -784
package/README.md
CHANGED
|
@@ -97,6 +97,14 @@ const d = await archil.getDisk("dsk-abc123");
|
|
|
97
97
|
// Run a command in a container with the disk mounted
|
|
98
98
|
const { stdout, stderr, exitCode } = await d.exec("ls -la /mnt && cat /mnt/config.json");
|
|
99
99
|
|
|
100
|
+
// Choose the image, size, and egress policy of the exec's VM
|
|
101
|
+
await d.exec("python3 train.py", {
|
|
102
|
+
baseImage: "python:3.12-slim",
|
|
103
|
+
vcpuCount: 4,
|
|
104
|
+
memSizeMib: 8192,
|
|
105
|
+
network: { egress: { default: "deny", allow: ["pypi.org", "files.pythonhosted.org"] } },
|
|
106
|
+
});
|
|
107
|
+
|
|
100
108
|
// Manage who can mount the disk
|
|
101
109
|
const user = await d.addUser({ type: "token", nickname: "ci" });
|
|
102
110
|
await d.removeUser("token", user.identifier!);
|