ray/setup.sh

50 lines
1.2 KiB
Bash
Raw Normal View History

2016-06-22 11:42:04 -07:00
#!/usr/bin/env bash
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
2016-06-10 15:35:49 -07:00
platform="unknown"
2016-06-22 11:42:04 -07:00
unamestr="$(uname)"
2016-06-10 15:35:49 -07:00
if [[ "$unamestr" == "Linux" ]]; then
echo "Platform is linux."
platform="linux"
elif [[ "$unamestr" == "Darwin" ]]; then
echo "Platform is macosx."
platform="macosx"
else
echo "Unrecognized platform."
exit 1
fi
if [[ $platform == "macosx" ]]; then
# check that brew is installed
which -s brew
if [[ $? != 0 ]]; then
echo "Could not find brew, please install brew (see http://brew.sh/)."
exit 1
else
echo "Updating brew."
brew update
fi
fi
if [[ $platform == "linux" ]]; then
sudo apt-get update
2016-06-20 15:58:19 -07:00
sudo apt-get install -y git cmake build-essential autoconf curl libtool python-dev python-numpy python-pip libboost-all-dev unzip libjpeg8-dev
2016-06-22 11:28:01 -07:00
sudo pip install -r requirements.txt
2016-06-10 15:35:49 -07:00
elif [[ $platform == "macosx" ]]; then
2016-06-22 11:28:01 -07:00
brew install git cmake automake autoconf libtool boost libjpeg
2016-06-10 15:35:49 -07:00
sudo easy_install pip
sudo pip install numpy
2016-06-22 11:28:01 -07:00
sudo pip install -r requirements.txt --ignore-installed six
2016-06-10 15:35:49 -07:00
fi
2016-06-22 11:42:04 -07:00
pushd "$ROOT_DIR/thirdparty"
./download_thirdparty.sh
./build_thirdparty.sh
pushd numbuf
pushd python
sudo python setup.py install
popd
popd
popd