Skip to content

Commit cb29aba

Browse files
committed
improved GPU not available error message
1 parent c89ee69 commit cb29aba

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

userdocker/subcommands/run.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ def prepare_nvidia_docker_run(args):
125125
for g in nv_gpus:
126126
if g not in gpus_available:
127127
raise UserDockerException(
128-
"ERROR: GPU %d is currently not available: " % g
128+
'ERROR: GPU %d is currently not available!\n'
129+
'Use "userdocker ps --gpu-free" to find available GPUs.\n'
130+
'Use "userdocker ps --gpu-used" or "nvidia-smi" to see why '
131+
'this GPU might not be available.' % g
129132
)
130133
else:
131134
# NV_GPU wasn't set, use admin defaults, tell user

0 commit comments

Comments
 (0)