updated prolog.d/10-GPU_allocate.sh
This commit is contained in:
parent
6d1a2e9759
commit
add7211f76
@ -42,7 +42,7 @@ if [ -z "${NGPUS}" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# get list of installed GPU's (exit without error if nvidia-smi is not available (i. e. no GPU's installed))
|
# get list of installed GPU's (exit without error if nvidia-smi is not available (i. e. no GPU's installed))
|
||||||
[ -f /usr/bin/nvidia-smi ] && GPU_LIST=$(/usr/bin/nvidia-smi -L | cut -f1 -d":" | cut -f2 -d" " | xargs shuf -e) || exit 0
|
[ -f /usr/bin/nvidia-smi ] && GPU_LIST=$(/usr/bin/nvidia-smi -L | cut -f1 -d":" | cut -f2 -d" " | xargs shuf -e 2>/dev/null) || exit 0
|
||||||
|
|
||||||
## loop over devices and try to allocate one until enough GPU's are allocated
|
## loop over devices and try to allocate one until enough GPU's are allocated
|
||||||
CUDA_VISIBLE_DEVICES=''
|
CUDA_VISIBLE_DEVICES=''
|
||||||
|
Loading…
Reference in New Issue
Block a user