nvidia instructions for installing tensorflow do not work on nvidia jetson tx1

Here are the nvidia instructions for installing tensorflow:
http://www.nvidia.com/object/gpu-accelerated-applications-tensorflow-installation.html

I installed the latest version of JetPack (2.3) on the jetson tx1 device.
All of the requirements listed in this install document are met by JetPack (2.3)

<b>Q: 64-bit Linux?</b>

ubuntu@tegra-ubuntu:~$ uname -a
Linux tegra-ubuntu 3.10.96-tegra #1 SMP PREEMPT Thu Sep 8 13:48:54 PDT 2016 aarch64 aarch64 aarch64 GNU/Linux

<b>Q: Python 2.7?</b>
ubuntu@tegra-ubuntu:~$ python --version
Python 2.7.11+
[b]
Q: NVIDIA CUDA® 7.5 (CUDA 8.0 required for Pascal GPUs)?[/b]

ubuntu@tegra-ubuntu:~$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Fri_Jul_15_14:52:12_CDT_2016
Cuda compilation tools, release 8.0, V8.0.33
ubuntu@tegra-ubuntu:~$ 

<b>Q: NVIDIA cuDNN v4.0 (minimum) or v5.1 (recommended)? </b>

ubuntu@tegra-ubuntu:~$ sudo cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR      5
#define CUDNN_MINOR      1
#define CUDNN_PATCHLEVEL 5
--
#define CUDNN_VERSION    (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"

However, when it came to installing bazel, I got this error.

ubuntu@tegra-ubuntu:~$ sudo apt-get install bazel
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package bazel

What is the work-around to this problem?

P.S. everything before this step worked okay …

ubuntu@tegra-ubuntu:~$ echo "deb http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
deb http://storage.googleapis.com/bazel-apt stable jdk1.8

ubuntu@tegra-ubuntu:~$ curl https://storage.googleapis.com/bazel-apt/doc/apt-key.pub.gpg | sudo apt-key add - 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3157  100  3157    0     0   5105      0 --:--:-- --:--:-- --:--:--  5116
OK

P.P.S.
I suspect this is because bazel has only been build for x86_64 and not for 64-bit arm.

We have tried building bazel ourselves for arm 64 to no avail.
The problem we encountered is that bazel requires grpc-java and we cannot get the gradle script to build grpc-java to work on arm 64. This seems to be a problem with gradle not being able to build for this architecture.
https://discuss.gradle.org/t/tool-chain-gcc-gnu-gcc-dont-know-how-to-build-for-platform-linux-aarch64/19232

That page intended to specify 64-bit Linux on x86_64, not aarch64 - I will send the maintainer a note.
Here are the threads to follow on building tensorflow for TX1: [url]https://devtalk.nvidia.com/default/topic/901148/jetson-tx1/tensorflow-on-jetson-tx1/[/url]
[url]https://github.com/tensorflow/tensorflow/issues/851[/url]

It looks like you posted an empty comment to the first.
I believe they found a work-around to bazel and perhaps JetPack 2.3 / CUDA8 may address the other issues.

I also came with the same problem. When I am trying to install the tensorflow on my computer.By step4,“Install Bazel”.It cames with the errors like this:
Err http://storage.googleapis.com stable InRelease

Err http://storage.googleapis.com stable Release.gpg
Cannot initiate the connection to storage.googleapis.com:80 (2404:6800:4008:c07::80). - connect (101: Network is unreachable) [IP: 2404:6800:4008:c07::80 80]
Fetched 21.7 MB in 2min 0s (181 kB/s)
Reading package lists… Done
W: Failed to fetch http://storage.googleapis.com/bazel-apt/dists/stable/InRelease

W: Failed to fetch http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages Hash Sum mismatch

W: Failed to fetch http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu/dists/trusty/main/binary-i386/Packages Hash Sum mismatch

W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/trusty/main/binary-amd64/Packages Hash Sum mismatch

W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/trusty/main/binary-i386/Packages Hash Sum mismatch

W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/trusty/main/binary-i386/Packages Hash Sum mismatch

W: Failed to fetch http://storage.googleapis.com/bazel-apt/dists/stable/Release.gpg Cannot initiate the connection to storage.googleapis.com:80 (2404:6800:4008:c07::80). - connect (101: Network is unreachable) [IP: 2404:6800:4008:c07::80 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.

I really have no idea about this.Is there anyone who can help?

Hi,

Sorry for keeping you waiting.
It looks like a network issue. Please check your networks status first.

Sharing our Bazel installation steps:
Prerequest

git clone https://github.com/bazelbuild/bazel.git
cd bazel
git checkout 0.3.2
cp ../protobuf/src/protoc third_party/protobuf/protoc-linux-arm32.exe
cp ../grpc-java/compiler/build/exe/java_plugin/protoc-gen-grpc-java third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-arm32.exe

Apply change

diff --git a/compile.sh b/compile.sh
index 53fc412..11035d9 100755
--- a/compile.sh
+++ b/compile.sh
@@ -27,7 +27,7 @@ cd "$(dirname "$0")"
 # Set the default verbose mode in buildenv.sh so that we do not display command
 # output unless there is a failure.  We do this conditionally to offer the user
 # a chance of overriding this in case they want to do so.
-: ${VERBOSE:=no}
+: ${VERBOSE:=yes}

 source scripts/bootstrap/buildenv.sh

diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index 77372f0..657b254 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -48,6 +48,7 @@ linux)
   else
     if [ "${MACHINE_IS_ARM}" = 'yes' ]; then
       PROTOC=${PROTOC:-third_party/protobuf/protoc-linux-arm32.exe}
+      GRPC_JAVA_PLUGIN=${GRPC_JAVA_PLUGIN:-third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-arm32.exe}
     else
       PROTOC=${PROTOC:-third_party/protobuf/protoc-linux-x86_32.exe}
       GRPC_JAVA_PLUGIN=${GRPC_JAVA_PLUGIN:-third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-x86_32.exe}
@@ -150,7 +151,7 @@ function java_compilation() {

   run "${JAVAC}" -classpath "${classpath}" -sourcepath "${sourcepath}" \
       -d "${output}/classes" -source "$JAVA_VERSION" -target "$JAVA_VERSION" \
-      -encoding UTF-8 "@${paramfile}"
+      -encoding UTF-8 "@${paramfile}" -J-Xmx500M

   log "Extracting helper classes for $name..."
   for f in ${library_jars} ; do
diff --git a/src/main/java/com/google/devtools/build/lib/util/CPU.java b/src/main/java/com/google/devtools/build/lib/util/CPU.java
index 41af4b1..4d80610 100644
--- a/src/main/java/com/google/devtools/build/lib/util/CPU.java
+++ b/src/main/java/com/google/devtools/build/lib/util/CPU.java
@@ -26,7 +26,7 @@ public enum CPU {
   X86_32("x86_32", ImmutableSet.of("i386", "i486", "i586", "i686", "i786", "x86")),
   X86_64("x86_64", ImmutableSet.of("amd64", "x86_64", "x64")),
   PPC("ppc", ImmutableSet.of("ppc", "ppc64", "ppc64le")),
-  ARM("arm", ImmutableSet.of("arm", "armv7l")),
+  ARM("arm", ImmutableSet.of("arm", "armv7l", "aarch64")),
   UNKNOWN("unknown", ImmutableSet.<String>of());

   private final String canonicalName;
diff --git a/third_party/grpc/BUILD b/third_party/grpc/BUILD
index 2ba07e3..c7925ff 100644
--- a/third_party/grpc/BUILD
+++ b/third_party/grpc/BUILD
@@ -29,7 +29,7 @@ filegroup(
         "//third_party:darwin": ["protoc-gen-grpc-java-0.15.0-osx-x86_64.exe"],
         "//third_party:k8": ["protoc-gen-grpc-java-0.15.0-linux-x86_64.exe"],
         "//third_party:piii": ["protoc-gen-grpc-java-0.15.0-linux-x86_32.exe"],
-        "//third_party:arm": ["protoc-gen-grpc-java-0.15.0-linux-x86_32.exe"],
+        "//third_party:arm": ["protoc-gen-grpc-java-0.15.0-linux-arm32.exe"],
         "//third_party:freebsd": ["protoc-gen-grpc-java-0.15.0-linux-x86_32.exe"],
     }),
 )
diff --git a/third_party/protobuf/BUILD b/third_party/protobuf/BUILD
index 203fe51..4c2a316 100644
--- a/third_party/protobuf/BUILD
+++ b/third_party/protobuf/BUILD
@@ -28,6 +28,7 @@ filegroup(
         "//third_party:darwin": ["protoc-osx-x86_32.exe"],
         "//third_party:k8": ["protoc-linux-x86_64.exe"],
         "//third_party:piii": ["protoc-linux-x86_32.exe"],
+        "//third_party:arm": ["protoc-linux-arm32.exe"],
         "//third_party:freebsd": ["protoc-linux-x86_32.exe"],
     }),
 )
diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl
index aeb0715..688835d 100644
--- a/tools/cpp/cc_configure.bzl
+++ b/tools/cpp/cc_configure.bzl
@@ -150,7 +150,12 @@ def _get_cpu_value(repository_ctx):
     return "x64_windows"
   # Use uname to figure out whether we are on x86_32 or x86_64
   result = repository_ctx.execute(["uname", "-m"])
-  return "k8" if result.stdout.strip() in ["amd64", "x86_64", "x64"] else "piii"
+  machine = result.stdout.strip()
+  if machine in ["arm", "armv7l", "aarch64"]:
+   return "arm"
+  elif machine in ["amd64", "x86_64", "x64"]:
+   return "k8"
+  return "piii"


 _INC_DIR_MARKER_BEGIN = "#include <...>"

Build

./compile.sh 
cp output/bazel /usr/bin/