2016-10-10 100 views
1

我想在Power8上運行Tensorflow。由於這是不可用的,我需要從源頭上構建它。爲了建立它,我需要巴澤爾。最新的Ubuntu版本不支持Bazel(據我所知),所以我也需要構建它。在建造Bazel時,我遇到了錯誤(列在下面)。Tensorflow/Bazel on Power8

我在Power8 here上找到了tensorflow的安裝指南。這將我鏈接到支持bazel電源的github project

該文章告訴我結帳分支v0.2.0-ppc。我然後運行

$./compile.sh 

這導致:

[50/392] Writing file src/main/java/com/google/devtools/build/lib/libbazel-rulERROR: /home/th/projects/incrementalDL/bazel/third_party/ijar/BUILD:16:1: C++ compilation of rule '//third_party/ijar:zip' failed: gcc failed: error executing command 

v0.3.0-PPC結果:

gRPC Java plugin not found in third_party/grpc/protoc-gen-grpc-java-0.13.2-linux-ppc64le.exe 

主與-PPC結果:

Protobuf compiler not found in third_party/protobuf/protoc-linux-ppc64le.exe 

而最接近Bazel master brach的那個,P支持,結果在:

ERROR: gRPC Java plugin not found in third_party/grpc/protoc-gen-grpc-java-0.15.0-linux-ppc64le.exe 

任何提示將不勝感激!

系統:

$lsb_release -a 
Description: Ubuntu 16.04.1 LTS 
$java -version 
openjdk version "1.8.0_91" 
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-3ubuntu1~16.04.1-b14) 
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode) 

回答

1

我收到一對夫婦向我指出了正確的方向私人信息,所以謝謝你的那些。這些都是讓我建立Tensorflow的能量8(我做他們不支持GPU)中的步驟:

  • 遵循這個blogpost
  • 利用從這次github的v0.2.0,PPC-protobuf的分支的要求巴澤爾
  • 得到了巴澤爾在bash完成工作所描述here
  • 繼續沿用以前blogpost籤自提混帳地方tensorflow和使用推薦櫻花選秀權,但並沒有編譯GPU
  • 構建使用

    $ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package 
    

    的PIP封裝,因爲我不想編譯GPU

  • 得到一個錯誤

    ERROR: /home/th/.cache/bazel/_bazel_th/994c6fd5bf0a6c9879e74e714d455083/external/farmhash_archive/BUILD:5:1: 
    configure: WARNING: 'missing' script is too old or missing 
    ./config.guess: unable to guess system type 
    

    下載了最新的config.guess和config.sub的如錯誤信息中所述:

    http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 
    and 
    http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 
    

    ,並將其放在「lpralf在7月14日評論」中提到的目錄中,如tensorflow github issue所述,但這不起作用,因此我向./[tensorflow-root-dir]/farmhash添加了2個副本。BUILD(如我的錯誤表示farmhash),配置運行權之前:

    cmd = "pushd external/farmhash_archive/%s; workdir=$$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $$workdir; pushd $$workdir; cp [absolute-path-to-the-downloaded-config.guess]/config.guess .; cp [absolute-path-to-the-downloaded-config.sub]/config.sub .;./configure; popd; popd; cp $$workdir/config.h $(@D); rm -rf $$workdir;" % prefix_dir, 
    
  • $ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg 
    
  • $ sudo pip install /tmp/tensorflow_pkg/tensorflow-[whatever-package-is-present].whl 
    
  • 測試與

    $ python ./tensorflow/models/image/mnist/convolutional.py 
    

    *請注意,有裏面的一個tensorflow目錄tensorflow根目錄

+0

即使它構建,也存在非確定性堆棧粉碎錯誤。這是由於glibc。更多信息[這裏](https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1642390) –