Created
October 3, 2016 01:45
-
-
Save petewarden/6a5ea0430b4a61df1472bcf3e4b09984 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y curl openjdk-8-jdk swig python3-numpy python3-dev python3 python-virtualenv python3-virtualenv swig zlib1g-dev | |
cd ~ | |
mkdir projects | |
virtualenv -p python3 --system-site-packages projects | |
cd ~/projects | |
git clone https://github.com/neo-titans/odroid | |
sudo fallocate -l 1G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo rm -rf /var/cuda-repo-8-0-local | |
rm -rf /home/ubuntu/cuda-l4t | |
# For grpc-java build | |
cd ~/projects | |
git clone https://github.com/google/protobuf.git | |
cd protobuf | |
git checkout tags/v3.0.0-beta-3 | |
./autogen.sh | |
LDFLAGS=-static ./configure --prefix=$(pwd)/../ | |
sed -i -e 's/LDFLAGS = -static/LDFLAGS = -all-static/' ./src/Makefile | |
make -j4 | |
make install | |
# For bazel build | |
git checkout tags/v3.0.0-beta-2 | |
./autogen.sh | |
LDFLAGS=-static ./configure --prefix=$(pwd)/../ | |
sed -i -e 's/LDFLAGS = -static/LDFLAGS = -all-static/' ./src/Makefile | |
make -j4 | |
cd ~/projects | |
git clone https://github.com/grpc/grpc-java | |
cd grpc-java | |
patch -p0 < ../odroid/build_tensorflow/grpc-java.v0.15.0.patch | |
CXXFLAGS="-I$(pwd)/../include" LDFLAGS="-L$(pwd)/../lib" ./gradlew java_pluginExecutable -Pprotoc=$(pwd)/../bin/protoc | |
cd ~/projects | |
git clone https://github.com/bazelbuild/bazel.git | |
cd bazel | |
git checkout 47be2a40c601b5e4737f7a6825fad7e7f6ce0302 | |
cp ../protobuf/src/protoc third_party/protobuf/protoc-linux-aarch64.exe | |
cp ../grpc-java/compiler/build/exe/java_plugin/protoc-gen-grpc-java third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-aarch64.exe | |
patch -p0 < ../odroid/build_tensorflow/bazel.47be2a4.patch | |
./compile.sh | |
cp output/bazel ../bin/ | |
export PATH=/home/ubuntu/projects/bin:${PATH} | |
cd ~/projects | |
git clone https://github.com/tensorflow/tensorflow | |
cd tensorflow | |
PYTHON_BIN_PATH=$(pwd)/../bin/python TF_NEED_GCP=0 TF_NEED_CUDA=1 ./configure | |
/home/ubuntu/projects/lib/python3.5/site-packages/ | |
bazel build --local_resources 2048,1.0,1.0 tensorflow/tools/benchmark:benchmark_model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment