forked from VowpalWabbit/reinforcement_learning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-linux.sh
39 lines (32 loc) · 901 Bytes
/
build-linux.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
#!/bin/bash
set -e
set -x
sudo apt remove --yes --force-yes cmake
# Upgrade CMake
version=3.5
build=2
mkdir ~/temp
cd ~/temp
wget https://cmake.org/files/v$version/cmake-$version.$build-Linux-x86_64.sh
sudo mkdir /opt/cmake
sudo sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
sudo ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
# add flat buffers
cd ~
git clone https://github.com/google/flatbuffers.git
cd ./flatbuffers
git checkout 925c1d77fcc72636924c3c13428a34180c30f96f # 1.10.0 release commit
mkdir build
cd build
cmake .. -DFLATBUFFERS_BUILD_TESTS=Off -DFLATBUFFERS_INSTALL=On -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_BUILD_FLATHASH=Off
make -j4
sudo make install
cd /reinforcement_learning
# Build reinforcement_learning
mkdir -p build
cd build
cmake ..
NUM_PROCESSORS=$(cat nprocs.txt)
make -j${NUM_PROCESSORS}
export CTEST_OUTPUT_ON_FAILURE=1
make test