<commit_before><commit_msg>docker<commit_after>#!/bin/bash

# build all images except the bootstrap that must be constructed manually

# get this script directory and file name, in case it is executed out of his parent directory
pushd $(dirname $0) > /dev/null

script_dir=$(pwd -P)
script_name=$(basename $0)

script=${script_dir}/${script_name}

popd > /dev/null

# browse each image directory in order and then, build each image
for d in $(sort <<< "$(find $script_dir -type d -maxdepth 1 ! -name 00-bootstrap ! -name docker ! -name .)"); do
  # get only the last part of the directory path
  image_name=$(basename $d)
  # replace numerical order by the repository owner
  image_name=$(sed -E 's/[0-9]{2}-(.+)/metabarj0\/\1/' <<< $image_name)
  # finally, build the image
  docker build --squash -t $image_name $d
done
{'fraction_non_alphanumeric': 0.13032886723507917, 'fraction_numerical': 0.012180267965895249, 'mean_word_length': 4.1375, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3174887', 'n_tokens_mistral': 273, 'n_tokens_neox': 258, 'n_words': 100}