<commit_before>#!/bin/bash
#
# Run from directory (repo) which has container-conf/build.sh
#
# cd ~/src/radiasoft/container-<name>
#
#     curl radia.run | bash -s containers [vagrant]
#
# or see radiasoft/download/README.md
#
#     install_server=http://$(dig $(hostname -f) +short):2916 bash -s container-build
#
# The script "build.sh" must define the following:
#
# $build_image_base - starting image name
# build_as_run_user() - executed after above as $build_run_user
#
# You can provide a build_push=1 environment variable to
# force the push to the registery (only works with docker).
#
# Optionally define:
#
# $build_batch_mode - defaults to false
# $build_passenv - variables to pass to containter
# $build_maintainer - identify author of image [RadiaSoft <(<EMAIL>|<EMAIL>)<EMAIL>>]
# $build_vagrant_uri - for help message on how to install in vagrant hub [https://depot.radiasoft.org/foss]
# $build_version - defaults to the time now, but can be any chronological version
#
# You could, but probably don't want to change these:
#
# $build_run_user - application runs as this user [vagrant]
# $build_run_uid - application user is this uid [1000]
set -euo pipefail

build_start_dir=$(pwd)

: ${build_passenv:=}
: ${build_batch_mode:=}

build_as_root() {
    : Executes as root after root setup complete
}

build_as_run_user() {
    : Executes as $run_user after root is built and home env setup
}

build_clean() {
    set +e
    trap - EXIT
    build_clean_container
    cd /
    if [[ ${build_dir:-} ]]; then
        rm -rf "$build_dir"
    fi
}

build_create_run_user() {
    if ! id -u $build_run_user >& /dev/null; then
        groupadd -g "$build_run_uid" "$build_run_user"
        useradd -m -g "$build_run_user" -u "$build_run_uid" "$build_run_user"
    fi
}

build_curl() {
    curl -s -S -L "$@"
}<commit_msg>: referred to invalid var<commit_after>#!/bin/bash
#
# Run from directory (repo) which has container-conf/build.sh
#
# cd ~/src/radiasoft/container-<name>
#
#     curl radia.run | bash -s containers [vagrant]
#
# or see radiasoft/download/README.md
#
#     install_server=http://$(dig $(hostname -f) +short):2916 bash -s container-build
#
# The script "build.sh" must define the following:
#
# $build_image_base - starting image name
# build_as_run_user() - executed after above as $build_run_user
#
# You can provide a build_push=1 environment variable to
# force the push to the registery (only works with docker).
#
# Optionally define:
#
# $build_batch_mode - defaults to false
# $build_passenv - variables to pass to containter
# $build_maintainer - identify author of image [RadiaSoft <(<EMAIL>|<EMAIL>)<EMAIL>>]
# $build_vagrant_uri - for help message on how to install in vagrant hub [https://depot.radiasoft.org/foss]
# $build_version - defaults to the time now, but can be any chronological version
#
# You could, but probably don't want to change these:
#
# $build_run_user - application runs as this user [vagrant]
# $build_run_uid - application user is this uid [1000]
set -euo pipefail

build_start_dir=$(pwd)

: ${build_passenv:=}
: ${build_batch_mode:=}

build_as_root() {
    : Executes as root after root setup complete
}

build_as_run_user() {
    : Executes as build_run_user after root is built and home env setup
}

build_clean() {
    set +e
    trap - EXIT
    build_clean_container
    cd /
    if [[ ${build_dir:-} ]]; then
        rm -rf "$build_dir"
    fi
}

build_create_run_user() {
    if ! id -u $build_run_user >& /dev/null; then
        groupadd -g "$build_run_uid" "$build_run_user"
        useradd -m -g "$build_run_user" -u "$build_run_uid" "$build_run_user"
    fi
}

build_curl() {
    curl -s -S -L "$@"
}
{'fraction_non_alphanumeric': 0.12081632653061225, 'fraction_numerical': 0.004897959183673469, 'mean_word_length': 3.743225806451613, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1295406', 'n_tokens_mistral': 1301, 'n_tokens_neox': 1267, 'n_words': 386}