mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
Build script for installing photon
This commit is contained in:
parent
c9780eb3ef
commit
e2509a044c
6 changed files with 107 additions and 60 deletions
|
@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 2.8)
|
|||
|
||||
project(orchestra)
|
||||
|
||||
set(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/thirdparty")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
||||
|
||||
find_package(Protobuf REQUIRED)
|
||||
|
@ -71,7 +73,7 @@ set(GENERATED_PROTOBUF_FILES ${ORCHESTRA_PB_H_FILE} ${ORCHESTRA_PB_CPP_FILE}
|
|||
${TYPES_GRPC_PB_H_FILE} ${TYPES_GRPC_PB_CPP_FILE})
|
||||
|
||||
include_directories(${GENERATED_PROTOBUF_PATH})
|
||||
link_libraries(grpc++_unsecure grpc pthread ${PROTOBUF_LIBRARY})
|
||||
link_libraries(grpc++_unsecure grpc pthread protobuf)
|
||||
if (UNIX AND NOT APPLE)
|
||||
link_libraries(rt)
|
||||
endif()
|
||||
|
|
64
README.md
64
README.md
|
@ -11,62 +11,8 @@ For a description of our design decisions, see
|
|||
|
||||
## Setup
|
||||
|
||||
**Install Arrow**
|
||||
|
||||
1. `git clone https://github.com/apache/arrow.git`
|
||||
2. `cd ~/arrow`
|
||||
3. `git checkout 2d8627cd81f83783b0ceb01d137a46b581ecba26`
|
||||
4. `cd ~/arrow/cpp`
|
||||
5. `bash setup_build_env.sh`
|
||||
6. `cd ~/arrow/cpp/thirdparty/flatbuffers-1.3.0`
|
||||
7. `export FLATBUFFERS_HOME=~/arrow/cpp/thirdparty/installed` (or equivalent)
|
||||
8. `cd ~/arrow/cpp/build`
|
||||
9. `cmake ..`
|
||||
10. `make`
|
||||
11. `sudo make install`
|
||||
12. add `export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/usr/local/lib` to your `~/.bashrc`
|
||||
13. `source ~/.bashrc`
|
||||
|
||||
**Install GRPC**
|
||||
|
||||
1. Follow the instructions [here](https://github.com/grpc/grpc/blob/master/INSTALL), though some of the instructions are outdated.
|
||||
2. `cd ~/grpc`
|
||||
3. `mkdir build`
|
||||
4. `cd build`
|
||||
5. `cmake ..`
|
||||
6. `make`
|
||||
7. `make install`
|
||||
8. `cd ..`
|
||||
9. `python setup.py install`
|
||||
|
||||
**Install Numbuf**
|
||||
|
||||
1. `git clone git@github.com:amplab/numbuf.git`
|
||||
2. `cd numbuf/cpp/`
|
||||
3. `mkdir build`
|
||||
4. `cd build`
|
||||
5. `cmake ..`
|
||||
6. `sudo make install`
|
||||
7. `cd ../..`
|
||||
8. `cd python/`
|
||||
9. `mkdir build`
|
||||
10. `cd build`
|
||||
11. `cmake ..`
|
||||
12. `sudo make install`
|
||||
13. `cd ..`
|
||||
14. `sudo python setup.py install`
|
||||
|
||||
|
||||
**Install Orchestra**
|
||||
|
||||
1. `git clone git@github.com:amplab/photon.git`
|
||||
2. `cd photon`
|
||||
3. `mkdir build`
|
||||
4. `cd build`
|
||||
5. `cmake ..`
|
||||
6. `make install`
|
||||
7. `cd ../lib/orchpy`
|
||||
8. `python setup.py install`
|
||||
9. `cd ~/orch/test`
|
||||
10. `bash gen-python-code.sh`
|
||||
11. `python runtest.py`
|
||||
1. sudo apt-get update
|
||||
2. sudo apt-get install git
|
||||
3. git clone https://github.com/amplab/photon.git
|
||||
4. cd photon
|
||||
5. bash setup.sh
|
||||
|
|
4
requirements.txt
Normal file
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
six >= 1.10
|
||||
typing
|
||||
subprocess32
|
||||
grpcio
|
16
setup.sh
Normal file
16
setup.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
sudo apt-get update
|
||||
sudo apt-get install git cmake build-essential python-dev python-numpy automake autoconf libtool python-pip libboost-all-dev unzip
|
||||
sudo pip install --ignore-installed six # getting rid of an old version of six, if it is installed (needed for Ubuntu 14.04)
|
||||
sudo pip install -r requirements.txt
|
||||
cd thirdparty
|
||||
bash download_thirdparty.sh
|
||||
bash build_thirdparty.sh
|
||||
cd numbuf
|
||||
cd python
|
||||
sudo python setup.py install
|
||||
mkdir -p ../../../build
|
||||
cd ../../../build
|
||||
cmake ..
|
||||
sudo make install
|
||||
cd ../lib/orchpy
|
||||
sudo python setup.py install
|
52
thirdparty/build_thirdparty.sh
vendored
Normal file
52
thirdparty/build_thirdparty.sh
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
||||
PREFIX=$TP_DIR/installed
|
||||
|
||||
# Determine how many parallel jobs to use for make based on the number of cores
|
||||
if [[ "$OSTYPE" =~ ^linux ]]; then
|
||||
PARALLEL=$(grep -c processor /proc/cpuinfo)
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
PARALLEL=$(sysctl -n hw.ncpu)
|
||||
else
|
||||
echo Unsupported platform $OSTYPE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "installing arrow"
|
||||
export FLATBUFFERS_HOME=$TP_DIR/arrow/cpp/thirdparty/installed/
|
||||
$TP_DIR/arrow/cpp/thirdparty/download_thirdparty.sh
|
||||
$TP_DIR/arrow/cpp/thirdparty/build_thirdparty.sh
|
||||
mkdir -p $TP_DIR/arrow/cpp/build
|
||||
cd $TP_DIR/arrow/cpp/build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make VERBOSE=1 -j$PARALLEL
|
||||
sudo make VERBOSE=1 install
|
||||
|
||||
echo "installing numbuf"
|
||||
mkdir -p $TP_DIR/numbuf/cpp/build
|
||||
cd $TP_DIR/numbuf/cpp/build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make VERBOSE=1 -j$PARALLEL
|
||||
sudo make VERBOSE=1 install
|
||||
mkdir -p $TP_DIR/numbuf/python/build
|
||||
cd $TP_DIR/numbuf/python/build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make VERBOSE=1 -j$PARALLEL
|
||||
sudo make VERBOSE=1 install
|
||||
|
||||
echo "installing GRPC"
|
||||
cd $TP_DIR/grpc/third_party/protobuf
|
||||
./autogen.sh
|
||||
export CXXFLAGS="$CXXFLAGS -fPIC"
|
||||
./configure --enable-static=no
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
cd python
|
||||
sudo python setup.py install
|
||||
cd $TP_DIR/grpc
|
||||
make VERBOSE=1 -j$PARALLEL
|
||||
sudo make VERBOSE=1 install
|
27
thirdparty/download_thirdparty.sh
vendored
Normal file
27
thirdparty/download_thirdparty.sh
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
TP_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
||||
|
||||
if [ ! -d arrow ]; then
|
||||
echo "Fetching arrow"
|
||||
git clone https://github.com/apache/arrow.git
|
||||
cd arrow
|
||||
git checkout 4bd13b852d376065fdb16c36fa821ab0e167f0fc
|
||||
cd ..
|
||||
fi
|
||||
|
||||
if [ ! -d numbuf ]; then
|
||||
echo "Fetching numbuf"
|
||||
git clone https://github.com/amplab/numbuf.git
|
||||
fi
|
||||
|
||||
if [ ! -d grpc ]; then
|
||||
echo "Fetching GRPC"
|
||||
git clone https://github.com/grpc/grpc.git
|
||||
cd grpc
|
||||
git submodule update --init
|
||||
cd ..
|
||||
fi
|
Loading…
Add table
Reference in a new issue