Skip to content

Commit 8778158

Browse files
committed
feat(cli): add --device as an alias for --gpu
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent 3ab8011 commit 8778158

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

architecture/gateway-single-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,9 @@ Host GPU drivers & NVIDIA Container Toolkit
316316
└─ Pods: request nvidia.com/gpu in resource limits
317317
```
318318

319-
### `--gpu` flag
319+
### `--gpu` / `--device` flag
320320

321-
The `--gpu` flag on `gateway start` accepts an optional value that overrides the automatic injection mode:
321+
The `--gpu` flag (aliased as `--device`) on `gateway start` accepts an optional value that overrides the automatic injection mode:
322322

323323
| Invocation | Behaviour |
324324
|---|---|

crates/openshell-cli/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ enum GatewayCommands {
808808
/// `nvidia.com/gpu` resources. Requires NVIDIA drivers and the
809809
/// NVIDIA Container Toolkit on the host.
810810
///
811-
/// An optional argument controls the injection mode:
811+
/// An optional argument controls the injection mode (`--device` is an alias):
812812
///
813813
/// --gpu Auto-select: CDI when enabled on the daemon, legacy otherwise
814814
/// --gpu=legacy Force legacy nvidia DeviceRequest (specify once only)
@@ -817,6 +817,7 @@ enum GatewayCommands {
817817
/// Example CDI device names: `nvidia.com/gpu=all`, `nvidia.com/gpu=0`
818818
#[arg(
819819
long = "gpu",
820+
alias = "device",
820821
num_args = 0..=1,
821822
default_missing_value = "auto",
822823
action = clap::ArgAction::Append,

docs/sandboxes/manage-gateways.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ $ openshell gateway info --name my-remote-cluster
168168

169169
| Flag | Purpose |
170170
|---|---|
171-
| `--gpu` | Enable NVIDIA GPU passthrough. Requires NVIDIA drivers and the Container Toolkit on the host. Accepts an optional value: omit for auto-select (CDI when enabled on the daemon, `--gpus all` otherwise), `--gpu=legacy` to force `--gpus all`, or `--gpu=<cdi-device>` to inject a specific CDI device (e.g. `nvidia.com/gpu=all`). May be repeated for multiple CDI devices. |
171+
| `--gpu` / `--device` | Enable NVIDIA GPU passthrough. Requires NVIDIA drivers and the Container Toolkit on the host. Accepts an optional value: omit for auto-select (CDI when enabled on the daemon, `--gpus all` otherwise), `--gpu=legacy` to force `--gpus all`, or `--gpu=<cdi-device>` to inject a specific CDI device (e.g. `nvidia.com/gpu=all`). May be repeated for multiple CDI devices. |
172172
| `--plaintext` | Listen on HTTP instead of mTLS. Use behind a TLS-terminating reverse proxy. |
173173
| `--disable-gateway-auth` | Skip mTLS client certificate checks. Use when a reverse proxy cannot forward client certs. |
174174
| `--registry-username` | Username for registry authentication. Defaults to `__token__` when `--registry-token` is set. Only needed for private registries. Also configurable with `OPENSHELL_REGISTRY_USERNAME`. |

0 commit comments

Comments
 (0)