File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,33 +11,27 @@ GROUP_NAME=`id -gn`
1111USER_NAME=$USER
1212PWD=$( pwd)
1313
14- USE_QUEUE=" -i"
15-
16- for OPT in " $@ " ; do
17- case $OPT in
18- ' -q' | ' --queue' )
19- USE_QUEUE=" "
20- shift 1;
21- ;;
22- esac
23- done
24-
14+ # Use GPU if available
2515GPU_OPTION=" "
2616if docker system info | grep -qE ' ^\s*Runtimes: .*nvidia.*' ; then
27- # Use GPU
2817 GPU_OPTION=" --gpus all"
2918fi
3019
31- # datasetディレクトリ以下のシンボリックリンクを探し、リンク先をマウントする
20+ # Check if TTY is available (not in CI environment)
21+ TTY_OPTION=" "
22+ if [ -t 0 ] && [ -t 1 ]; then
23+ TTY_OPTION=" -it"
24+ fi
25+
26+ # Mount symlinks in dataset directory
3227SYMLINK_MOUNTS=" "
3328for symlink in $( find " ${PWD} /dataset" -type l) ; do
3429 target=$( dirname " $symlink " ) /$( readlink " $symlink " )
3530 [ -e " $target " ] && SYMLINK_MOUNTS+=" -v $target :$target "
3631done
3732
3833docker run \
39- -t \
40- $USE_QUEUE \
34+ $TTY_OPTION \
4135 $GPU_OPTION \
4236 --rm \
4337 --shm-size=128g \
You can’t perform that action at this time.
0 commit comments