Browse Source

GCP sudo docker userdata.sh (#2393)

* GCP sudo docker

* cleanup
5.0
Glenn Jocher GitHub 3 years ago
parent
commit
e8a2b83268
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      utils/aws/userdata.sh

+ 4
- 4
utils/aws/userdata.sh View File

@@ -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

Loading…
Cancel
Save