#!/bin/bash ###################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # SPDX-License-Identifier: MIT-0 # ###################################################################### if [ -f /aws-do-eks/.env ]; then pushd /aws-do-eks else pushd ../../../../../../ fi source .env popd # Create registry if needed REGISTRY_COUNT=$(aws ecr describe-repositories | grep ${IMAGE} | wc -l) if [ "$REGISTRY_COUNT" == "0" ]; then aws ecr create-repository --repository-name ${IMAGE} fi # Login to registry echo "Logging in to $REGISTRY ..." aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY # Push image to registry echo "Pushing image habana-tensorflow-efa to $REGISTRY ..." docker push ${REGISTRY}habana-tensorflow-efa