Skip to content

A prolonged update to more new version #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# installTensorFlowTX2
September 13, 2017
April 4, 2018
JetsonHacks

Install TensorFlow v1.3 on NVIDIA Jetson TX2 Development Kit
Install TensorFlow v1.6 on NVIDIA Jetson TX2 Development Kit

Jetson TX2 is flashed with JetPack 3.1 which installs:
* L4T 28.1 an Ubuntu 16.04 64-bit variant (aarch64)
* CUDA 8.0
* cuDNN 6.0
Jetson TX2 is flashed with JetPack 3.2 which installs:
* L4T 28.2 an Ubuntu 16.04 64-bit variant (aarch64)
* CUDA 9.0
* cuDNN 7.0.5

### Pre-built installation

If you are only interested in installing Tensorflow on the TX2, not building from source, pre-built wheel files are available here: https://github.com/jetsonhacks/installTensorFlowJetsonTX
If you are only interested in installing Tensorflow on the TX2, not building from source, pre-built wheel files are available here: https://github.com/dwijaybane/installTensorFlowTX2/releases

You can also use prebuilt bazel 0.11.1 by downloading bazel-11.1 and rename it and move to system:
mv bazel-11.1 bazel
sudo cp bazel /usr/local/bin/

If you are interested in building from source, read on.
### Preparation
Expand All @@ -30,21 +34,21 @@ TensorFlow should be built in the following order:
## For Python 2.7

#### installPrerequisites.sh
Installs Java and other dependencies needed. Also builds Bazel version 0.5.2.
Installs Java and other dependencies needed. Also builds Bazel version 0.11.1.

#### cloneTensorFlow.sh
Git clones v1.3.0 from the TensorFlow repository and patches the source code for aarch64
Git clones v1.6.0 from the TensorFlow repository and patches the source code for aarch64

#### setTensorFlowEV.sh
Sets up the TensorFlow environment variables. This script will ask for the default python library path. There are many settings to chose from, the script picks the usual suspects. Uses python 2.7.

## For Python 3.5

#### installPrerequisitesPy3.sh
Installs Java and other dependencies needed. Also builds Bazel version 0.5.2.
Installs Java and other dependencies needed. Also builds Bazel version 0.11.1.

#### cloneTensorFlow.sh
Git clones v1.3.0 from the TensorFlow repository and patches the source code for aarch64
Git clones v1.6.0 from the TensorFlow repository and patches the source code for aarch64

#### setTensorFlowEVPy3.sh
Sets up the TensorFlow environment variables. This script will ask for the default python library path. There are many settings to chose from, the script picks the usual suspects. Uses python 3.5.
Expand Down Expand Up @@ -79,6 +83,11 @@ This TensorFlow installation procedure was derived from these discussion threads
</ul>

### Release Notes
April 4, 2018
* L4T 28.2 (JetPack 3.2)
* TensorFlow 1.6
* Without TensorRT support

September 13, 2017
* L4T 28.1 (JetPack 3.1)
* TensorFlow 1.3
Expand Down
5 changes: 2 additions & 3 deletions buildTensorFlow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# Export TensorFlow GPU environment variables
# WARNING This needs to match setTensorFlowEV.sh settings
export TF_NEED_CUDA=1
export TF_CUDA_VERSION=8.0
export TF_CUDA_VERSION=9.0
export CUDA_TOOLKIT_PATH=/usr/local/cuda
export TF_CUDNN_VERSION=6.0.21
export TF_CUDNN_VERSION=7.0.5
export CUDNN_INSTALL_PATH=/usr/lib/aarch64-linux-gnu/
export TF_CUDA_COMPUTE_CAPABILITIES=6.2

# Build Tensorflow
cd $HOME/tensorflow
bazel build -c opt --local_resources 3072,4.0,1.0 --verbose_failures --config=cuda //tensorflow/tools/pip_package:build_pip_package

5 changes: 2 additions & 3 deletions cloneTensorFlow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ INSTALL_DIR=$PWD
cd $HOME
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout v1.3.0
patch -p1 < $INSTALL_DIR/patches/tensorflow.patch
git checkout v1.6.0
# Patch up the Workspace.bzl for the Github Checksum issue
patch -p1 < $INSTALL_DIR/patches/workspacebzl.patch
#patch -p1 < $INSTALL_DIR/patches/workspacebzl.patch



Expand Down
11 changes: 6 additions & 5 deletions scripts/installBazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
# NVIDIA Jetson TX2
# TensorFlow Installation
# Install Bazel
# Version 0.10.0
# Version 0.11.1
# We use the release distribution so that we don't have to build protobuf
#
INSTALL_DIR=$PWD
cd $HOME
wget --no-check-certificate https://github.com/bazelbuild/bazel/releases/download/0.10.0/bazel-0.10.0-dist.zip
unzip bazel-0.10.0-dist.zip -d bazel-0.10.0-dist
sudo chmod -R ug+rwx $HOME/bazel-0.10.0-dist
wget https://github.com/bazelbuild/bazel/releases/download/0.11.1/bazel-0.11.1-dist.zip
unzip bazel-0.11.1-dist.zip -d bazel-0.11.1-dist

sudo chmod -R ug+rwx $HOME/bazel-0.11.1-dist
# git clone https://github.com/bazelbuild/bazel.git
cd bazel-0.10.0-dist
cd bazel-0.11.1-dist
./compile.sh
sudo cp output/bazel /usr/local/bin
11 changes: 8 additions & 3 deletions setTensorFlowEV.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ TF_NEED_CUDA=1
default_gcc_host_compiler_path=$(which gcc)
GCC_HOST_COMPILER_PATH=$default_gcc_host_compiler_path
# TF CUDA Version
TF_CUDA_VERSION=8.0
TF_CUDA_VERSION=9.0
# CUDA path
default_cuda_path=/usr/local/cuda
CUDA_TOOLKIT_PATH=$default_cuda_path
# cuDNN
TF_CUDNN_VERSION=6.0.21
TF_CUDNN_VERSION=7.0.5
default_cudnn_path=/usr/lib/aarch64-linux-gnu
CUDNN_INSTALL_PATH=$default_cudnn_path
# CUDA compute capability
Expand All @@ -36,10 +36,15 @@ CC_OPT_FLAGS=-march=native
TF_NEED_JEMALLOC=1
TF_NEED_OPENCL=0
TF_ENABLE_XLA=0
# Added for TensorFlow 1.3
# Added for TensorFlow 1.6
TF_NEED_S3=0
TF_NEED_KAFKA=0
TF_NEED_OPENCL_SYCL=0
TF_NEED_MKL=0
TF_NEED_MPI=0
TF_NEED_GDR=0
TF_NEED_VERBS=0
TF_NEED_TENSORRT=0
# Use nvcc for CUDA compiler
TF_CUDA_CLANG=0

Expand Down
11 changes: 8 additions & 3 deletions setTensorFlowEVPy3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ TF_NEED_CUDA=1
default_gcc_host_compiler_path=$(which gcc)
GCC_HOST_COMPILER_PATH=$default_gcc_host_compiler_path
# TF CUDA Version
TF_CUDA_VERSION=8.0
TF_CUDA_VERSION=9.0
# CUDA path
default_cuda_path=/usr/local/cuda
CUDA_TOOLKIT_PATH=$default_cuda_path
# cuDNN
TF_CUDNN_VERSION=6.0.21
TF_CUDNN_VERSION=7.0.5
default_cudnn_path=/usr/lib/aarch64-linux-gnu
CUDNN_INSTALL_PATH=$default_cudnn_path
# CUDA compute capability
Expand All @@ -36,10 +36,15 @@ CC_OPT_FLAGS=-march=native
TF_NEED_JEMALLOC=1
TF_NEED_OPENCL=0
TF_ENABLE_XLA=0
# Added for TensorFlow 1.3
# Added for TensorFlow 1.6
TF_NEED_S3=0
TF_NEED_KAFKA=0
TF_NEED_OPENCL_SYCL=0
TF_NEED_MKL=0
TF_NEED_MPI=0
TF_NEED_GDR=0
TF_NEED_VERBS=0
TF_NEED_TENSORRT=0
# Use nvcc for CUDA compiler
TF_CUDA_CLANG=0

Expand Down