3

大規模な IBM Power8 マシンにアクセスでき、そこに TensorFlow をインストールしたいと考えています。当然、クイック pip インストールを試みましたが、失敗しました。

sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.6.0-cp27-none-linux_x86_64.whl
tensorflow-0.6.0-cp27-none-linux_x86_64.whl is not a supported wheel on this platform.
Storing debug log for failure in /home/pv/.pip/pip.log

残念ながら、pip.log には有用な情報がほとんど含まれていません。

/usr/bin/pip run on Sat Feb  6 17:29:34 2016
tensorflow-0.6.0-cp27-none-linux_x86_64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
    InstallRequirement.from_line(name, None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 168, in from_line
    raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
UnsupportedWheel: tensorflow-0.6.0-cp27-none-linux_x86_64.whl is not a supported wheel on this platform.

次に試したのは、TensorFlow をソースからビルドすることでした。無駄に、私の試みはすべて、cannot execute binary file: Exec format error次のようなメッセージで終了しました。

/usr/local/bin/bazel: line 86: /usr/local/lib/bazel/bin/bazel-real: cannot execute binary file: Exec format error

そこで、Bazel をソースからコンパイルしようとしましたが、同様のハード エラーが発生しました。

me@machine:~/bazel-0.1.5$ ./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO:    ./compile.sh compile /path/to/bazel
  Building Bazel from scratch.
Compiling Java stubs for protocol buffers...
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel.T9C83cNa/src src/main/protobuf/android_studio_ide_info.proto
scripts/bootstrap/buildenv.sh: line 63: third_party/protobuf/protoc-linux-x86_32.exe: cannot execute binary file: Exec format error
pv@sardonis:~/bazel-0.1.5$ ^C

ただし、Power8 マシンでソースから Protobuf コンパイラをビルドする方法を説明するこのリンクhttp://www.cnblogs.com/rodenpark/p/5007744.htmlを見つけました。これは機能し、彼の別のトピックhttp://www.cnblogs.com/rodenpark/p/5007846.htmlで説明されている変更を行った後、少なくともコンパイル プロセスを開始することができました。しかし、今では大量のエラーが発生してクラッシュしますが、それ自体はそれほど深刻ではないように見えますが、膨大な量のエラーが本当に絶望的に見えます。参考のためにhttp://pastebin.com/KjkseaGxに投稿しました。

だから… インスピレーションが不足しています。TensorFlow を Power8 マシンで動作させるにはどうすればよいですか?

4

2 に答える 2

3

bazel 0.2.0-ppc をインストールします

tf@ubuntu16:~$ git clone https://github.com/ibmsoe/bazel
tf@ubuntu16:~/bazel$ git checkout v0.2.0-ppc
tf@ubuntu16:~/bazel$ ./compile.sh

テンソルフローをインストールする

tf@ubuntu16:~$ git clone --recurse-submodules https://github.com/tensorflow/tensorflow
tf@ubuntu16:~/tensorflow$ git checkout  v0.10.0rc0
tf@ubuntu16:~/tensorflow$ git commit -m"v0.10.0rc0"
tf@ubuntu16:~/tensorflow$ git cherry-pick ce70f6cf842a46296119337247c24d307e279fa0
tf@ubuntu16:~/tensorflow$ git cherry-pick f1acb3bd828a73b15670fc8019f06a5cd51bd564
tf@ubuntu16:~/tensorflow$ git cherry-pick 9b6215a691a2eebaadb8253bd0cf706f2309a0b8
tf@ubuntu16:~/tensorflow$ ./configure
tf@ubuntu16:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

ここで、次のようなエラーが発生します

エラー: /home/tf/.cache/bazel/_bazel_tf/b2f766da603b0bed56d4c1d0b178456a/external/farmhash_archive/BUILD:5:1: genrule @farmhash_archive の実行に失敗しました: bash に失敗しました: コマンド /bin/bash -c の実行中にエラーが発生しました .. (残りの 1 つの引数はスキップされました): com.google.devtools.build.lib.shell.BadExitStatusException: プロセスはステータス 1 で終了しました。 /farmhash-34c13ddfab0e35422f4c3979f360635a8c050260 /home/tf/.cache/bazel/_bazel_tf/b2f766da603b0bed56d4c1d0b178456a/tensorflow /tmp/tmp.XdCPQefJyZ /home/tf/.cache/bazel/_bazel_tf/b2f766da603b0bed56d4c1d0b178456a/tensorflow/external/farmhash_archive/farmhash-34c13ddfab0e35422f4c3979f360635a8c050260 /home /tf/.cache/bazel/_bazel_tf/b2f766da603b0bed56d4c1d0b178456a/tensorflow

ppc64le のスタンザを挿入するには、以下のように config.guess を編集する必要があります。

tf@ubuntu16:~/.cache/bazel/_bazel_tf/b2f766da603b0bed56d4c1d0b178456a/external/farmhash_archive/farmhash-34c13ddfab0e35422f4c3979f360635a8c050260$ vi config.guess
    *:BSD/OS:*:*)
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
        exit ;;
+    ppc64le:Linux:*:*)
+      echo powerpc64le-unknown-linux-gnu
+      exit ;;
    *:FreeBSD:*:*)
        case ${UNAME_MACHINE} in
tf@ubuntu16:~/tensorflow$ bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
tf@ubuntu16:~/tensorflow$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
tf@ubuntu16:~/tensorflow$ sudo pip install /tmp/tensorflow_pkg/tensorflow*.whl
tf@ubuntu16:~/tensorflow/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfi
tf@ubuntu16:~/tensorflow$ mkdir _python_build
tf@ubuntu16:~/tensorflow$ cd _python_build
tf@ubuntu16:~/tensorflow/_python_build$ ln -s ~/tensorflow/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/tensorflow/* .
tf@ubuntu16:~/tensorflow/_python_build$ ln -s ~/tensorflow/tools/* .
tf@ubuntu16:~/tensorflow/_python_build$ python  __init__.py develop
于 2016-09-29T07:34:33.587 に答える