<commit_before>#!/bin/sh

VERSION=${VERSION:="1.0.0"}
INPUT_DIR=${INPUT_DIR:="`pwd`"}
SCRIPTS_DIR=${SCRIPTS_DIR:="$INPUT_DIR/scripts"}
OUTPUT_DIR=${OUTPUT_DIR:="$INPUT_DIR/target"}

# Pre-create the target directory
mkdir -p $OUTPUT_DIR

docker run -t --rm -v $SCRIPTS_DIR:/scripts:z -v $INPUT_DIR:/input:z -v $OUTPUT_DIR:/output:z jboss/dockerfile-generator:$VERSION
<commit_msg>Use template instead of the whole directory, add more output messages<commit_after>#!/bin/sh

VERSION=${VERSION:="1.0.0"}
TEMPLATE=${TEMPLATE:="image.yaml"}
SCRIPTS_DIR=${SCRIPTS_DIR:="`pwd`/scripts"}
OUTPUT_DIR=${OUTPUT_DIR:="`pwd`/target"}

# Pre-create the target directory
mkdir -p $OUTPUT_DIR

echo "Using template: $TEMPLATE"
echo "Using scripts directory: $SCRIPTS_DIR"
echo "Using output directory: $OUTPUT_DIR"

docker run -t --rm -v $SCRIPTS_DIR:/scripts:z -v $TEMPLATE:/input/image.yaml:z -v $OUTPUT_DIR:/output:z jboss/dockerfile-generator:$VERSION

{'fraction_non_alphanumeric': 0.17215727948990436, 'fraction_numerical': 0.006376195536663124, 'mean_word_length': 6.785123966942149, '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': '7502412', 'n_tokens_mistral': 361, 'n_tokens_neox': 351, 'n_words': 70}