#!/bin/bash -e set -x here="$(realpath "$(dirname "$0")")" cd "$here" echo "---------- initialize venv ----------" lsof "./venv/bin/python" | awk 'NR > 1 {print $2}' | xargs kill || : lsof "./venv/Scripts/activate" | awk 'NR > 1 {print $2}' | xargs kill || : python -m pip install --upgrade pip python -m venv venv source "./venv/bin/activate" || source "./venv/Scripts/activate" || : python -m pip install --upgrade pip python -m pip install --upgrade -r "src/requirements.txt" cd "$here"