Skip to content

Commit

Permalink
GCP sudo docker userdata.sh (ultralytics#2393)
Browse files Browse the repository at this point in the history
* GCP sudo docker

* cleanup
  • Loading branch information
glenn-jocher committed Mar 8, 2021
1 parent 4fe6a6f commit 4032479
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/aws/userdata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4032479

Please sign in to comment.