lium exec
Execute a command on one or more pods.
lium exec TARGETS [COMMAND] [OPTIONS]
Arguments​
TARGETS— Pod name, index, comma-separated list, orall.COMMAND— The command to execute. Optional when you pass--script.
Options​
| Flag | Effect |
|---|---|
--script, -s PATH | Execute a local script file on the pod(s) instead of an inline command |
--env, -e KEY=VALUE | Set an environment variable for the command (repeatable) |
Examples​
lium exec my-pod "python train.py"
lium exec 1 "nvidia-smi"
lium exec 1,2,3 "apt update" # Multiple pods
lium exec all "pip install numpy" # Every running pod
lium exec my-pod --script ./setup.sh # Run a local script
lium exec my-pod -e WANDB_MODE=offline "python train.py"