Skip to main content

lium exec

Execute a command on one or more pods.

lium exec POD COMMAND [OPTIONS]

Arguments​

  • POD — Pod name, index, comma-separated list, or all.
  • COMMAND — The command to execute on the pod.

Options​

FlagEffect
--timeout SECONDSAbort if the command runs longer than this
--output FILESave combined stdout/stderr to a local file

Examples​

lium exec my-pod "python train.py"
lium exec 1 "nvidia-smi" --output gpu_info.txt
lium exec 1,2,3 "apt update" # Multiple pods
lium exec all "pip install numpy" # Every running pod

See also​

  • lium ssh — interactive shell
  • lium scp — push code first, then exec