peterlee0127 / tensorflow-nvJetson

TensorFlow for NVIDIA Jetson, also include patch and script for building.
https://tfjetson.peterlee.app
205 stars 61 forks source link

Building from source? #16

Closed aamini closed 6 years ago

aamini commented 6 years ago

This is so awesome! Thanks so much for releasing these compiled versions!

I'm trying to build Tensorflow on an NVIDIA Drive PX2. The GPU of a PX2 is equivalent to the Jetson TX2 and typically building from source with TX2 instructions yields good results (ie. a successful build). Could you share some information on how you obtained these build files? (ie. what version of Bazel/gcc did you use? did you have to patch any of the tensorflow code such as tensorflow/workspace.bzl?) Thanks again!

aamini commented 6 years ago

I just noticed a previous issue #12 which seem to already address this -- apologies for the repost. Could you still confirm your bazel/gcc version for building 1.8?

peterlee0127 commented 6 years ago

Hi, aamini

You need to patch tf1.8 first. https://github.com/peterlee0127/tensorflow-nvJetson/blob/master/tensorflow1.8.patch Or you can build by this script https://github.com/peterlee0127/tensorflow-nvJetson/blob/master/buildTensorflow.sh Or Download latest build for TX2

$ sh -c "$(curl -fsSL https://tfjetson.peterlee0127.com/installTF.sh)"

P.S. My build all using JetPack 3.2

$ bazel version
Build label: 0.11.1- (@non-git)
Build target: bazel-out/arm-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Jul 20 08:11:56 +50209 (1522293120716)
Build timestamp: 1522293120716
Build timestamp as int: 1522293120716
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/5/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-arm64 --with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
aamini commented 6 years ago

Thanks, that works!