From 10adee6d136bbb43e1e30cba128eae12e7c73d69 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 7 Mar 2021 20:20:27 -0800 Subject: [PATCH 1/2] GCP sudo docker --- utils/aws/userdata.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/aws/userdata.sh b/utils/aws/userdata.sh index a6d6e7976cf3..ab0506fe0375 100644 --- a/utils/aws/userdata.sh +++ b/utils/aws/userdata.sh @@ -16,12 +16,12 @@ if [ ! -d yolov5 ]; then else echo "Running re-start script." # resume interrupted runs i=0 - list=$(docker ps -qa) # container list i.e. $'one\ntwo\nthree\nfour' + list=$(sudo docker ps -qa) # container list i.e. $'one\ntwo\nthree\nfour' while IFS= read -r id; do ((i++)) echo "restarting container $i: $id" - docker start $id - # docker exec -it $id python train.py --resume # single-GPU - docker exec -d $id python utils/aws/resume.py + sudo docker start $id + # sudo docker exec -it $id python train.py --resume # single-GPU + sudo docker exec -d $id python utils/aws/resume.py # multi-scenario done <<<"$list" fi From be52fe53f0a0c85a77322089ea308f35c14ac99f Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 7 Mar 2021 20:21:08 -0800 Subject: [PATCH 2/2] cleanup --- utils/aws/userdata.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/aws/userdata.sh b/utils/aws/userdata.sh index ab0506fe0375..890606b76a06 100644 --- a/utils/aws/userdata.sh +++ b/utils/aws/userdata.sh @@ -22,6 +22,6 @@ else echo "restarting container $i: $id" sudo docker start $id # sudo docker exec -it $id python train.py --resume # single-GPU - sudo docker exec -d $id python utils/aws/resume.py # multi-scenario + sudo docker exec -d $id python utils/aws/resume.py # multi-scenario done <<<"$list" fi