<commit_before>#!/bin/bash

cd "$(dirname "$0")"

set -e

IMAGE_TAG=${IMAGE_TAG:-'prod_vpp_agent'}

sudo docker build  ${DOCKER_BUILD_ARGS} --tag ${IMAGE_TAG} .<commit_msg>        Add arm64 support for contiv/vpp docker images building         The naming rules of the built docker images is given below:         1. For x86_64 arch, it would be named as: dev-vpp-agent-amd64:latest         2. For arm64 arch, it would be named as: dev-vpp-agent-arm64:latest         3. The docker images built for amd64 are tagged as the default:         dev-vpp-agent-amd64:latest ---> dev-vpp-agent:latest<commit_after>#!/bin/bash

cd "$(dirname "$0")"

set -e

#To prepare for future fat manifest image by multi-arch manifest,
#now build the docker image with its arch
#For fat manifest, please refer
#https://docs.docker.com/registry/spec/manifest-v2-2/#example-manifest-list

BUILDARCH=`uname -m`

if [ ${BUILDARCH} = "aarch64" ] ; then
  IMAGE_TAG=${IMAGE_TAG:-'prod_vpp_agent-arm64'}
  # Dockerfile  for prod_vpp_agent expects that dev-vpp-agent:latest image is built
  sudo docker tag dev_vpp_agent-arm64:latest dev_vpp_agent:latest
fi


if [ ${BUILDARCH} = "x86_64" ] ; then
  # for AMD64 platform is used the default image (without suffix -amd64)
  IMAGE_TAG=${IMAGE_TAG:-'prod_vpp_agent'}
  # Dockerfile expects that dev-vpp-agent:latest image is built
  # Here it is granted
fi

sudo docker build  ${DOCKER_BUILD_ARGS} --tag ${IMAGE_TAG} .

if [[ ${BUILDARCH} = "x86_64" && ${IMAGE_TAG} = "prod_vpp_agent" ]] ; then
  # tag also explicit docker image on AMD64 platform
  docker tag  ${IMAGE_TAG}:latest prod_vpp_agent-amd64:latest
fi

# cleaning
if [ ${BUILDARCH} = "aarch64" ] ; then
  sudo docker rmi dev_vpp_agent:latest
fi
{'fraction_non_alphanumeric': 0.11627906976744186, 'fraction_numerical': 0.02732558139534884, 'mean_word_length': 3.9596541786743518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7207626', 'n_tokens_mistral': 635, 'n_tokens_neox': 583, 'n_words': 181}