<commit_before># Small script to run tests for a target (or all targets) inside all the
# respective docker images.

set -ex

run() {
    local target=$1

    echo $target

    # This directory needs to exist before calling docker, otherwise docker will create it but it
    # will be owned by root
    mkdir -p target

    docker build -t $target ci/docker/$target
    docker run \
           --rm \
           --user $(id -u):$(id -g) \
           -e CARGO_HOME=/cargo \
           -e CARGO_TARGET_DIR=/target \
           -v $HOME/.cargo:/cargo \
           -v `pwd`/target:/target \
           -v `pwd`:/checkout:ro \
           -v `rustc --print sysroot`:/rust:ro \
           -w /checkout \
           -it $target \
           sh -c "HOME=/tmp PATH=\$PATH:/rust/bin ci/run.sh $target"
}

if [ -z "$1" ]; then
  for d in `ls ci/docker/`; do<commit_msg>Don't pass `-it` to docker<commit_after># Small script to run tests for a target (or all targets) inside all the
# respective docker images.

set -ex

run() {
    local target=$1

    echo $target

    # This directory needs to exist before calling docker, otherwise docker will create it but it
    # will be owned by root
    mkdir -p target

    docker build -t $target ci/docker/$target
    docker run \
           --rm \
           --user $(id -u):$(id -g) \
           -e CARGO_HOME=/cargo \
           -e CARGO_TARGET_DIR=/target \
           -v $HOME/.cargo:/cargo \
           -v `pwd`/target:/target \
           -v `pwd`:/checkout:ro \
           -v `rustc --print sysroot`:/rust:ro \
           -w /checkout \
           $target \
           sh -c "HOME=/tmp PATH=\$PATH:/rust/bin ci/run.sh $target"
}

if [ -z "$1" ]; then
  for d in `ls ci/docker/`; do
{'fraction_non_alphanumeric': 0.130586186883343, 'fraction_numerical': 0.0023215322112594312, 'mean_word_length': 1.6687306501547987, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '715782', 'n_tokens_mistral': 597, 'n_tokens_neox': 550, 'n_words': 190}