<commit_before>#!/bin/bash -ex

host=${1:-"cz5545-fuel"}
branch=${2:-$(git rev-parse --abbrev-ref HEAD)}

version=$(awk -F\" '/version/{print $2}' < setup.py)
wheel="octane_nailgun-${version}-py2-none-any.whl"

location="octane/octane_nailgun"
container="fuel-core-6.1-nailgun"

git push --force "$host" "$branch"

ssh $host "cd ${location}; git reset --hard $branch"
ssh $host "cd ${location}; git clean -x -d -f"

id=$(ssh $host "docker inspect -f='{{if .ID}}{{.ID}}{{else}}{{.Id}}{{end}}' ${container}")
rootfs="/var/lib/docker/devicemapper/mnt/${id}/rootfs"
ssh $host "patch -bV numbered -Np1 -d $rootfs < ${location}/tools/urls.py.patch || :"

ssh $host "cd ${location}; python setup.py bdist_wheel"

ssh $host "cd ${location}; dockerctl copy dist/${wheel} nailgun:/root/${wheel}"
ssh $host "docker exec ${container} pip install -U ${wheel}"
ssh $host "dockerctl shell ${container} pkill -f wsgi"
<commit_msg>At first try to install octane pkg<commit_after>#!/bin/bash -ex

host=${1:-"cz5545-fuel"}
branch=${2:-$(git rev-parse --abbrev-ref HEAD)}

version=$(awk -F\" '/version/{print $2}' < setup.py)
wheel="octane_nailgun-${version}-py2-none-any.whl"

location="octane/octane_nailgun"
container="fuel-core-6.1-nailgun"

git push --force "$host" "$branch"

ssh $host "cd ${location}; git reset --hard $branch"
ssh $host "cd ${location}; git clean -x -d -f"

ssh $host "cd ${location}; python setup.py bdist_wheel"
ssh $host "cd ${location}; dockerctl copy dist/${wheel} nailgun:/root/${wheel}"
ssh $host "docker exec ${container} pip install -U ${wheel}"

id=$(ssh $host "docker inspect -f='{{if .ID}}{{.ID}}{{else}}{{.Id}}{{end}}' ${container}")
rootfs="/var/lib/docker/devicemapper/mnt/${id}/rootfs"
ssh $host "patch -bV numbered -Np1 -d $rootfs < ${location}/tools/urls.py.patch || :"

ssh $host "dockerctl shell ${container} pkill -f wsgi"

{'fraction_non_alphanumeric': 0.22282314764737696, 'fraction_numerical': 0.011898323418063819, 'mean_word_length': 4.873015873015873, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4983894', 'n_tokens_mistral': 723, 'n_tokens_neox': 675, 'n_words': 178}