18 lines
350 B
Bash
18 lines
350 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
###############################################
|
||
|
# release allocated GPUS
|
||
|
###############################################
|
||
|
|
||
|
### set variables
|
||
|
LOCK_FILE=/tmp/gpu-lockfile
|
||
|
|
||
|
files=$(grep -s -l $JOB_ID ${LOCK_FILE}-* | xargs echo)
|
||
|
if [ ! -z "${files}" ] ; then
|
||
|
for file in ${files} ; do
|
||
|
rm -f ${file} || exit 1
|
||
|
done
|
||
|
fi
|
||
|
|
||
|
exit 0
|