Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ jobs:
- run:
command: make ci-push-images
no_output_timeout: 20m
- run:
command: make ci-backup-images
no_output_timeout: 20m

e2e-tests:
docker:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ ci-build-images:
@./build/build-images.sh

ci-push-images:
@./build/push-images.sh
@./build/push-images.sh quay.io

ci-backup-images:
@./build/push-images.sh docker.io

ci-build-cli:
@./build/cli.sh
Expand Down
7 changes: 4 additions & 3 deletions build/push-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ set -euo pipefail

CORTEX_VERSION=master

image=$1
host=$1
image=$2

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

if [ "$image" == "python-predictor-gpu" ]; then
cuda=("10.0" "10.1" "10.1" "10.2" "10.2" "11.0" "11.1")
cudnn=("7" "7" "8" "7" "8" "8" "8")
for i in ${!cudnn[@]}; do
docker push quay.io/cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
docker push $host/cortexlabs/${image}:${CORTEX_VERSION}-cuda${cuda[$i]}-cudnn${cudnn[$i]}
done
else
docker push quay.io/cortexlabs/${image}:${CORTEX_VERSION}
docker push $host/cortexlabs/${image}:${CORTEX_VERSION}
fi
6 changes: 4 additions & 2 deletions build/push-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. >/dev/null && pwd)"
source $ROOT/build/images.sh
source $ROOT/dev/util.sh

host=$1

# if parallel utility is installed, the docker push commands will be parallelized
if command -v parallel &> /dev/null && [ -n "${NUM_BUILD_PROCS+set}" ] && [ "$NUM_BUILD_PROCS" != "1" ]; then
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[@]}"
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[@]}"
else
for image in "${all_images[@]}"; do
$ROOT/build/push-image.sh $image
$ROOT/build/push-image.sh $host $image
done
fi