forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·44 lines (39 loc) · 1.11 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
platform="unknown"
unamestr="$(uname)"
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 https://brew.sh/)."
exit 1
else
echo "Updating brew."
brew update
fi
fi
if [[ $platform == "linux" ]]; then
sudo apt-get update
sudo apt-get install -y git cmake build-essential autoconf curl libtool python-dev python-numpy python-pip libboost-all-dev unzip libjpeg8-dev
sudo pip install -r requirements.txt
elif [[ $platform == "macosx" ]]; then
brew install git cmake automake autoconf libtool boost libjpeg
sudo easy_install pip
sudo pip install numpy
sudo pip install -r requirements.txt --ignore-installed six
fi
pushd "$ROOT_DIR/thirdparty"
./download_thirdparty.sh
./build_thirdparty.sh
popd