<commit_before>#!/bin/bash

if [ ! -d tf ]; then
    virtualenv --system-site-packages tf
fi

source tf/bin/activate

pip install --upgrade pip
pip install ipdb
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl

cd tf
git clone https://github.com/danielnaber/jwordsplitter
cd jwordsplitter
./build.sh
cd ../..

pip install --upgrade javabridge
<commit_msg>GPU environment<commit_after>#!/bin/bash

if [ ! -d tf ]; then
    virtualenv --system-site-packages tf
fi

if [ ! -d tf-gpu ]; then
    virtualenv --system-site-packages tf-gpu
fi
cat tf-gpu/bin/activate - << EOF > tf-gpu/bin/activate-cuda
CUDA_DIR=/usr/local/cuda

if [ -d $CUDA_DIR ] ; then
    echo "Initializing CUDA directories"
    export CUDA_HOME=$CUDA_DIR
    export PATH=$PATH:$CUDA_DIR/bin
    export LD_LIBRARY_PATH=$CUDA_DIR/lib64:/home/helcl/cudnn/lib64
fi
EOF

source tf/bin/activate
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
deactivate

source tf-gpu/bin/activate
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl
deactivate

for ENV in tf tf-gpu; do
    source $ENV/bin/activate
    pip install --upgrade pip
    pip install --upgrade ipdb
    pip install --upgrade javabridge
    pip install --upgrade termcolor
    deactivate
done

# Decompounder
cd tf
if [ ! -d jwordsplitter ]; then
    git clone https://github.com/danielnaber/jwordsplitter
    cd jwordsplitter
    ./build.sh
fi
cd ../..
ln -s tf/jwordsplitter tf-gpu/jwordsplitter

{'fraction_non_alphanumeric': 0.1206896551724138, 'fraction_numerical': 0.019088669950738917, 'mean_word_length': 3.3449197860962565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 5, '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': '55707', 'n_tokens_mistral': 623, 'n_tokens_neox': 575, 'n_words': 133}