You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/openshell-driver-docker/README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,33 @@ contract:
86
86
|`restart_policy = unless-stopped`| Keeps managed sandboxes resumable across daemon or gateway restarts. |
87
87
|`PidsLimit`| Enforces the sandbox PID budget at the Docker cgroup layer. Set `[openshell.drivers.docker].sandbox_pids_limit = 0` to inherit the Docker/runtime default. |
88
88
| CDI GPU request | Uses opaque `driver_config.cdi_devices` values when set; otherwise selects the requested count of NVIDIA CDI GPUs in round-robin order when daemon CDI support is detected. Docker daemon `/info` can permit `nvidia.com/gpu=all` as a WSL2 all-only compatibility fallback, where it counts as one selectable device. Exact CDI device lists must not contain duplicates and must match the effective GPU count. |
89
+
| CDI context upload | For GPU/CDI sandboxes only, mounts daemon-reported CDI spec directories read-only under `/run/openshell/supervisor/cdi-specs/<n>` and uploads `/run/openshell/supervisor/cdi-context.json` after container create and before start. |
89
90
90
91
The agent child process does not retain these supervisor privileges.
91
92
93
+
## CDI GPU Metadata
94
+
95
+
Docker remains the source of truth for GPU injection. The driver selects opaque
96
+
CDI device IDs from `driver_config.cdi_devices` or the daemon's discovered CDI
97
+
inventory, then passes the same IDs to Docker with a CDI `DeviceRequest`.
98
+
99
+
When a GPU/CDI request is present, the driver also mounts the Docker
100
+
daemon-reported `Info.CDISpecDirs` into supervisor-only paths and uploads a
101
+
small versioned CDI context through Docker's container archive API. The context
102
+
uses container-side spec paths for resolution and keeps host-side spec sources
103
+
diagnostic-only. If the upload fails, the driver removes the created container
104
+
and sandbox token file before reporting the failure.
105
+
106
+
The sandbox supervisor resolves the selected IDs from those mounted specs
107
+
before it launches agent processes. CDI device nodes become read-write
108
+
Landlock paths, mount destinations default to read-only paths, and
109
+
`additionalGids` become supplemental groups for the entrypoint and SSH child
110
+
processes. Writable CDI mount destinations are accepted only for exact
111
+
single-file paths already listed in the sandbox policy `read_write` list;
0 commit comments