<commit_before>#!/usr/bin/env bash
echo "--- Start provisioning ---"
basedir="/vagrant/"

#update package sources
sudo apt-get update
#install git
sudo apt-get install -y build-essential git

#install all plugin provision scripts
cd /tmp

#########################
#node-js
echo "--- Start node provisioning ---"

if [ $(dpkg-query -W -f='${Status}' nodejs 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
  sudo apt-get install -y curl
  curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
  sudo apt-get install -y nodejs
else
  echo "node already installed"
fi

#########################
#packages
echo "--- Start package provisioning ---"

set -vx #to turn echoing on and
sudo apt-get install -y `cat ${basedir}debian_packages.txt | tr '\r' ' ' | tr '\n' ' '`
set +vx #to turn them both off

#########################
#python
echo "--- Start python provisioning ---"

#install python and some standard packages
sudo apt-get install -y python-pip python-dev zlib1g-dev cython

pip install --user -r ${basedir}requirements.txt
pip install --user -r ${basedir}requirements_dev.txt

#########################
#bash
echo "--- Start bash configuration ---"
if ! grep -Fxq "cd ${basedir}" /home/vagrant/.bashrc ; then
  echo "cd ${basedir}" >> /home/vagrant/.bashrc
  chown vagrant:vagrant /home/vagrant/.bashrc
fi

#########################
#custom
echo "--- Start custom provisioning ---"

for line in $(find ${basedir} -maxdepth 2 -name 'vagrant*.sh'); do
  echo "--- execution provision script: $line"
  ( exec ${line} )
done

echo "--- Done, use 'vagrant ssh' for jumping into the VM ---"<commit_msg>install requirements local for vagrant user<commit_after>#!/usr/bin/env bash
echo "--- Start provisioning ---"
basedir="/vagrant/"

#update package sources
sudo apt-get update
#install git
sudo apt-get install -y build-essential git

#install all plugin provision scripts
cd /tmp

#########################
#node-js
echo "--- Start node provisioning ---"

if [ $(dpkg-query -W -f='${Status}' nodejs 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
  sudo apt-get install -y curl
  curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
  sudo apt-get install -y nodejs
else
  echo "node already installed"
fi

#########################
#packages
echo "--- Start package provisioning ---"

set -vx #to turn echoing on and
sudo apt-get install -y `cat ${basedir}debian_packages.txt | tr '\r' ' ' | tr '\n' ' '`
set +vx #to turn them both off

#########################
#python
echo "--- Start python provisioning ---"

#install python and some standard packages
sudo apt-get install -y python-pip python-dev zlib1g-dev cython

sudo -u vagrant pip install --user -r ${basedir}requirements.txt
sudo -u vagrant pip install --user -r ${basedir}requirements_dev.txt

#########################
#bash
echo "--- Start bash configuration ---"
if ! grep -Fxq "cd ${basedir}" /home/vagrant/.bashrc ; then
  echo "cd ${basedir}" >> /home/vagrant/.bashrc
  chown vagrant:vagrant /home/vagrant/.bashrc
fi

#########################
#custom
echo "--- Start custom provisioning ---"

for line in $(find ${basedir} -maxdepth 2 -name 'vagrant*.sh'); do
  echo "--- execution provision script: $line"
  ( exec ${line} )
done

echo "--- Done, use 'vagrant ssh' for jumping into the VM ---"
{'fraction_non_alphanumeric': 0.2116788321167883, 'fraction_numerical': 0.0030413625304136255, 'mean_word_length': 3.5935754189944134, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '2652984', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1038, 'n_words': 365}