Skip to content

Commit dd2682c

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

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
@@ -788,7 +788,7 @@ enum GatewayCommands {
788788
/// `nvidia.com/gpu` resources. Requires NVIDIA drivers and the
789789
/// NVIDIA Container Toolkit on the host.
790790
///
791-
/// An optional argument controls the injection mode:
791+
/// An optional argument controls the injection mode (`--device` is an alias):
792792
///
793793
/// --gpu Auto-select: CDI on Docker >= 28.2.0, legacy otherwise
794794
/// --gpu=legacy Force legacy nvidia DeviceRequest (specify once only)
@@ -797,6 +797,7 @@ enum GatewayCommands {
797797
/// Example CDI device names: `nvidia.com/gpu=all`, `nvidia.com/gpu=0`
798798
#[arg(
799799
long = "gpu",
800+
alias = "device",
800801
num_args = 0..=1,
801802
default_missing_value = "auto",
802803
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 on Docker >= 28.2.0, `--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 on Docker >= 28.2.0, `--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)