在IBM power8上安装TensorFlow
我可以访问一台大型IBMPOWER8机器,并希望在其上安装TensorFlow。当然,我尝试了快速pip安装,但失败了:在IBM power8上安装TensorFlow,tensorflow,bazel,protocol-buffers,Tensorflow,Bazel,Protocol Buffers,我可以访问一台大型IBMPOWER8机器,并希望在其上安装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
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。无效,我所有的尝试都以一些无法执行二进制文件: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
Install 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
me@machine:~/bazel-0.1.5$/compile.sh
信息:通过提供bazel二进制文件的路径作为第二个参数,可以跳过第一步:
信息:./compile.sh compile/path/to/bazel
安装bazel 0.2.0-ppc
安装tensorflow
在这里,您将遇到一个错误,类似这样的错误
错误:/home/tf/.cache/bazel/_bazel_tf/b2f766da603b0bed56d4dc1d0b178456a/external/farmhash_archive/BUILD:5:1:执行genrule@farmhash_archive/:configure失败:bash失败:执行命令/bin/bash-c时出错。。。(跳过其余1个参数):com.google.devtools.build.lib.shell.badexitstatuseException:进程已退出,状态为1。
/home/tf/.cache/bazel/_-bazel\u tf/b2f766da603b0bed56d4c1d0b178456a/tensorflow/external/farmhash\u archive/farmhash-34c13ddfab0e35422f4c3979f36035a8c0520260/home/tf/.cache/bazel/_-bazel\u-tf/b2f766da603b0bed4d4c1d0b178456a/tensorflow
/tmp/tmp.XdCPQefJyZ/home/tf/.cache/bazel/_bazel_tf/b2f766da603b0bed56d4c1d0b178456a/tensorflow/external/farmhash_archive/farmhash-34c13dfab0e35422f4c3979f3603a8c50260/home/tf/.cache/bazel/_bazel/.b2f766da603b0bed56d4c1d0b178456a/tensorflow
您必须按如下所示编辑config.guess以插入ppc64le的节
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-gnu
+ exit ;;
*:FreeBSD:*:*)
case ${UNAME_MACHINE} in
使用miniconda:
rm miniconda.sh
echo export IBM_POWERAI_LICENSE_ACCEPT=yes >> ~/.bashrc
source ~/.bashrc
安装miniconda:
rm miniconda.sh
echo export IBM_POWERAI_LICENSE_ACCEPT=yes >> ~/.bashrc
source ~/.bashrc
接受条件并允许将conda添加到路径
conda config --add default_channels https://repo.anaconda.com/pkgs/main
conda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/
这需要在终端上添加(基本)。添加正确的频道作为第一优先级
conda create -n ai python=3.7
conda activate ai
conda install --strict-channel-priority tensorflow-gpu
创建环境(最好不要在基础上安装软件包)
有关IBM Power 8和Anaconda上的miniconda的更多信息:&这意味着您拥有的二进制文件与您尝试运行它的位置不兼容,请尝试从源代码构建bazel。但我做到了!我在上面添加了明确的错误消息,也许这会给你更多信息?对我来说,似乎我也需要编译protobuf,因为第三方/protobuf/protoc-linux-x86_32.exe
可能不是正确的编译器。我使用了的说明,还尝试了源代码的tar.gz。那么我该怎么办呢?另外,我尝试的另一件事是用我的发行版附带的/usr/local/bin/protoc的符号链接替换protoc-linux-x86_32.exe(版本是libprotoc 3.0.0
,根据protoc--version
)。然而,这也导致了类似的错误:我在这里专门推出了一个关于Bazel的新主题:可能最好先解决这一部分。IBM已经为Tensorflow、torch和其他深度学习平台预构建了二进制文件。说明可在其网站上查阅。
rm miniconda.sh
echo export IBM_POWERAI_LICENSE_ACCEPT=yes >> ~/.bashrc
source ~/.bashrc
conda config --add default_channels https://repo.anaconda.com/pkgs/main
conda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/
conda create -n ai python=3.7
conda activate ai
conda install --strict-channel-priority tensorflow-gpu