<commit_before>#!/bin/bash
root=$(git rev-parse --show-toplevel)
static_dir=kbase-extension/static/kbase
ext_components_dir=kbase-extension/static/ext_components
nbextension_dir=nbextensions
container_root=/kb/dev_container/narrative/
if [ -z $env ]; then
	echo "The 'env' environment variable is required"
	exit 1
fi
docker run \
	--dns=8.8.8.8 \
	-e "CONFIG_ENV=${env}" \
	--network=kbase-dev \
	--name=narrative  \
	--mount type=bind,src=${root}/${static_dir},dst=${container_root}/${static_dir} \
	--mount type=bind,src=${root}/${ext_components_dir},dst=${container_root}/${ext_components_dir} \
	--mount type=bind,src=${root}/${nbextension_dir},dst=${container_root}/kbase-extension/static/${nbextension_dir} \
	--rm kbase/narrative:dev<commit_msg>remove ext_components mount - usually breaks unless ext_components are installed locally<commit_after>#!/bin/bash
root=$(git rev-parse --show-toplevel)
static_dir=kbase-extension/static/kbase
ext_components_dir=kbase-extension/static/ext_components
nbextension_dir=nbextensions
container_root=/kb/dev_container/narrative/
if [ -z $env ]; then
	echo "The 'env' environment variable is required"
	exit 1
fi
# use this below if you want to install and mount external components (bower packages) into the running container.
# --mount type=bind,src=${root}/${ext_components_dir},dst=${container_root}/${ext_components_dir} \
docker run \
	--dns=8.8.8.8 \
	-e "CONFIG_ENV=${env}" \
	--network=kbase-dev \
	--name=narrative  \
	--mount type=bind,src=${root}/${static_dir},dst=${container_root}/${static_dir} \
	--mount type=bind,src=${root}/${nbextension_dir},dst=${container_root}/kbase-extension/static/${nbextension_dir} \
	--rm kbase/narrative:dev
{'fraction_non_alphanumeric': 0.16381850324101355, 'fraction_numerical': 0.0058927519151443725, 'mean_word_length': 5.68503937007874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1844968', 'n_tokens_mistral': 605, 'n_tokens_neox': 596, 'n_words': 100}