<commit_before>#!/bin/sh -e

[[ -z "${DART_CONFIG}" ]] && echo "environment variable needs to be set: DART_CONFIG" && exit 1
source ../util.sh
source ./docker-local-init.sh

pushd ../../ > /dev/null


echo "reading configuration: ${DART_CONFIG}"
OLD_IFS=${IFS}
IFS=
CONFIG="$(DART_ROLE=tool dart_conf)"
DOCKER_IMAGE_FLASK=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.web.boto_args.Parameters[@.ParameterKey is 'FlaskWorkerDockerImage'][0].ParameterValue")
DOCKER_IMAGE_WORKER_ENGINE=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.'engine-worker'.boto_args.Parameters[@.ParameterKey is 'EngineWorkerDockerImage'][0].ParameterValue")
DOCKER_IMAGE_WORKER_TRIGGER=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.'trigger-worker'.boto_args.Parameters[@.ParameterKey is 'TriggerWorkerDockerImage'][0].ParameterValue")
DOCKER_IMAGE_WORKER_SUBSCRIPTION=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.'subscription-worker'.boto_args.Parameters[@.ParameterKey is 'SubscriptionWorkerDockerImage'][0].ParameterValue")
IFS=${OLD_IFS}

$(aws ecr get-login)<commit_msg>General build improvment, to include ECR_ID 249030517958 by default when logging in to ECR<commit_after>#!/bin/sh -e

[[ -z "${DART_CONFIG}" ]] && echo "environment variable needs to be set: DART_CONFIG" && exit 1
source ../util.sh
source ./docker-local-init.sh

pushd ../../ > /dev/null

ECR_ID=${ECR_ID:-249030517958} # by default use eng account ecr id -249030517958. Can provide ECR_ID=XXX in commandline to override

echo "reading configuration: ${DART_CONFIG}"
OLD_IFS=${IFS}
IFS=
CONFIG="$(DART_ROLE=tool dart_conf)"
DOCKER_IMAGE_FLASK=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.web.boto_args.Parameters[@.ParameterKey is 'FlaskWorkerDockerImage'][0].ParameterValue")
DOCKER_IMAGE_WORKER_ENGINE=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.'engine-worker'.boto_args.Parameters[@.ParameterKey is 'EngineWorkerDockerImage'][0].ParameterValue")
DOCKER_IMAGE_WORKER_TRIGGER=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.'trigger-worker'.boto_args.Parameters[@.ParameterKey is 'TriggerWorkerDockerImage'][0].ParameterValue")
DOCKER_IMAGE_WORKER_SUBSCRIPTION=$(dart_conf_value "${CONFIG}" "$.cloudformation_stacks.'subscription-worker'.boto_args.Parameters[@.ParameterKey is 'SubscriptionWorkerDockerImage'][0].ParameterValue")
IFS=${OLD_IFS}

$(aws ecr get-login --registry-ids ECR_ID)
{'fraction_non_alphanumeric': 0.15384615384615385, 'fraction_numerical': 0.019126819126819128, 'mean_word_length': 8.218390804597702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '5199994', 'n_tokens_mistral': 838, 'n_tokens_neox': 804, 'n_words': 134}