File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ jobs:
115115 - run :
116116 command : make ci-push-images
117117 no_output_timeout : 20m
118+ - run :
119+ command : make ci-backup-images
120+ no_output_timeout : 20m
118121
119122 e2e-tests :
120123 docker :
Original file line number Diff line number Diff line change @@ -203,7 +203,10 @@ ci-build-images:
203203 @./build/build-images.sh
204204
205205ci-push-images :
206- @./build/push-images.sh
206+ @./build/push-images.sh quay.io
207+
208+ ci-backup-images :
209+ @./build/push-images.sh docker.io
207210
208211ci-build-cli :
209212 @./build/cli.sh
Original file line number Diff line number Diff line change @@ -19,16 +19,17 @@ set -euo pipefail
1919
2020CORTEX_VERSION=master
2121
22- image=$1
22+ host=$1
23+ image=$2
2324
2425echo " $DOCKER_PASSWORD " | docker login -u " $DOCKER_USERNAME " --password-stdin
2526
2627if [ " $image " == " python-predictor-gpu" ]; then
2728 cuda=(" 10.0" " 10.1" " 10.1" " 10.2" " 10.2" " 11.0" " 11.1" )
2829 cudnn=(" 7" " 7" " 8" " 7" " 8" " 8" " 8" )
2930 for i in ${! cudnn[@]} ; do
30- docker push quay.io /cortexlabs/${image} :${CORTEX_VERSION} -cuda${cuda[$i]} -cudnn${cudnn[$i]}
31+ docker push $host /cortexlabs/${image} :${CORTEX_VERSION} -cuda${cuda[$i]} -cudnn${cudnn[$i]}
3132 done
3233else
33- docker push quay.io /cortexlabs/${image} :${CORTEX_VERSION}
34+ docker push $host /cortexlabs/${image} :${CORTEX_VERSION}
3435fi
Original file line number Diff line number Diff line change @@ -22,11 +22,13 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"
2222source $ROOT /build/images.sh
2323source $ROOT /dev/util.sh
2424
25+ host=$1
26+
2527# if parallel utility is installed, the docker push commands will be parallelized
2628if command -v parallel & > /dev/null && [ -n " ${NUM_BUILD_PROCS+set} " ] && [ " $NUM_BUILD_PROCS " != " 1" ]; then
27- ROOT=$ROOT DOCKER_USERNAME=$DOCKER_USERNAME DOCKER_PASSWORD=$DOCKER_PASSWORD SHELL=$( type -p /bin/bash) parallel --will-cite --halt now,fail=1 --eta --jobs $NUM_BUILD_PROCS $ROOT /build/push-image.sh {} ::: " ${all_images[@]} "
29+ ROOT=$ROOT DOCKER_USERNAME=$DOCKER_USERNAME DOCKER_PASSWORD=$DOCKER_PASSWORD SHELL=$( type -p /bin/bash) parallel --will-cite --halt now,fail=1 --eta --jobs $NUM_BUILD_PROCS $ROOT /build/push-image.sh $host {} ::: " ${all_images[@]} "
2830else
2931 for image in " ${all_images[@]} " ; do
30- $ROOT /build/push-image.sh $image
32+ $ROOT /build/push-image.sh $host $ image
3133 done
3234fi
You can’t perform that action at this time.
0 commit comments