blob: 8c5f50d94c4a75eca7bdc1c21f597e661faea362 [file] [log] [blame]
#!/bin/bash
BASEDIR=$(pwd)
REQUIREMENTS=$BASEDIR/containers/xos/pip_requirements.txt
VENVDIR=venv-xos
echo $BASEDIR
echo $REQUIREMENTS
echo $VENVDIR
# create venv if it's not yet there
if [ ! -d "$BASEDIR/$VENVDIR" ]; then
echo "Setting up virtualenv for XOS"
virtualenv -q $BASEDIR/$VENVDIR --no-site-packages
pip install --upgrade pip
echo "Virtualenv created."
fi
# activate the virtual env
if [ ! $VIRTUAL_ENV ]; then
source $BASEDIR/$VENVDIR/bin/activate
echo "Virtualenv activated."
fi
# install pip requirements
if pip install -r $REQUIREMENTS
then
echo "Requirements installed."
echo "Virtualenv ready"
else
echo "An error occurred"
fi