disk 1.11.0 → 1.12.1

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 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!);