From 31b5d9ea7187772e2b0b16da868b697d2a470480 Mon Sep 17 00:00:00 2001 From: Dwijay Bane Date: Wed, 4 Apr 2018 16:07:16 +0530 Subject: [PATCH 1/3] Updated for Tensorflow v1.6 with jetpack3.2 --- README.md | 26 +++++++++++++++----------- buildTensorFlow.sh | 5 ++--- cloneTensorFlow.sh | 5 ++--- scripts/installBazel.sh | 11 ++++++----- setTensorFlowEV.sh | 11 ++++++++--- setTensorFlowEVPy3.sh | 11 ++++++++--- 6 files changed, 41 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 0d45a49..a4d73d6 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ # installTensorFlowTX2 -September 13, 2017 -JetsonHacks +April 4, 2018 -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 @@ -30,10 +29,10 @@ 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. @@ -41,10 +40,10 @@ Sets up the TensorFlow environment variables. This script will ask for the defau ## 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. @@ -79,6 +78,11 @@ This TensorFlow installation procedure was derived from these discussion threads ### 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 diff --git a/buildTensorFlow.sh b/buildTensorFlow.sh index 9e478b7..d38be9a 100755 --- a/buildTensorFlow.sh +++ b/buildTensorFlow.sh @@ -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 - diff --git a/cloneTensorFlow.sh b/cloneTensorFlow.sh index 23ad5ff..eb24c60 100755 --- a/cloneTensorFlow.sh +++ b/cloneTensorFlow.sh @@ -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 diff --git a/scripts/installBazel.sh b/scripts/installBazel.sh index cb33e20..8bed50e 100755 --- a/scripts/installBazel.sh +++ b/scripts/installBazel.sh @@ -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 diff --git a/setTensorFlowEV.sh b/setTensorFlowEV.sh index f91847b..a67dc2f 100755 --- a/setTensorFlowEV.sh +++ b/setTensorFlowEV.sh @@ -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 @@ -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 diff --git a/setTensorFlowEVPy3.sh b/setTensorFlowEVPy3.sh index 0bc5693..c634445 100755 --- a/setTensorFlowEVPy3.sh +++ b/setTensorFlowEVPy3.sh @@ -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 @@ -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 From 4e2cefc9861884580c1578ee856ea6fc407bae67 Mon Sep 17 00:00:00 2001 From: Dwijay Bane Date: Wed, 4 Apr 2018 16:20:38 +0530 Subject: [PATCH 2/3] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a4d73d6..70d0647 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # installTensorFlowTX2 April 4, 2018 +JetsonHacks Install TensorFlow v1.6 on NVIDIA Jetson TX2 Development Kit @@ -10,7 +11,11 @@ Jetson TX2 is flashed with JetPack 3.2 which installs: ### 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/tag/vL4T28.2TF1.6 + +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 From 9cc4f338b7e8d993e7958de607f6ef17cb1da455 Mon Sep 17 00:00:00 2001 From: Dwijay Bane Date: Tue, 24 Apr 2018 16:40:51 +0530 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70d0647..3465ac1 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Jetson TX2 is flashed with JetPack 3.2 which installs: ### 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/dwijaybane/installTensorFlowTX2/releases/tag/vL4T28.2TF1.6 +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