SmileTM / SmileTM.github.io

1 stars 0 forks source link

那些年走过的坑-tf2_gpu安装 | SmileTM博客 #7

Closed SmileTM closed 1 year ago

SmileTM commented 4 years ago

https://s-tm.cn/2019/09/28/%E9%82%A3%E4%BA%9B%E5%B9%B4%E8%B5%B0%E8%BF%87%E7%9A%84%E5%9D%91-tf2-gpu%E5%AE%89%E8%A3%85/

Tensorflow-gpu 的安装的复杂早有耳闻,以前一直用的都是cpu版,一直通过conda一键安装,过于安逸。 哎,欠的账始终是要还的。 最近,接触到实验室服务器后,开始捣鼓Tensoflow2.0-gpu,才发现各种神坑。首先因为学校服务器都是共享的无法获取root权限,导致无法更新显卡驱动,使得cuda10 ,无法安装。于是只能安装cuda9 。然后问题来了,google只提供了tens

shenhao2954988368 commented 3 years ago

写得挺好的

gmt710 commented 3 years ago

你好,我想编译cuda9.0 tensorflow-v2.3.0。已经编译快一周了,一直都卡住,想请问你这边有尝试过吗?

在你的github上有过留言:https://github.com/SmileTM/Tensorflow2.X-GPU-CUDA9.0/issues/6

SmileTM commented 3 years ago

你好,我想编译cuda9.0 tensorflow-v2.3.0。已经编译快一周了,一直都卡住,想请问你这边有尝试过吗?

在你的github上有过留言:SmileTM/Tensorflow2.X-GPU-CUDA9.0#6

目前,暂时没有尝试,可能后续 尝试下tf2.4 吧。

gmt710 commented 3 years ago

嗯,想请教下,你这边用的什么gcc的环境呢?

SmileTM commented 3 years ago

嗯,想请教下,你这边用的什么gcc的环境呢?

我当时没有刻意去配置gcc环境,用的就是一开始系统已有的,但现在不知道是否 还匹配tf2.3 gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gmt710 commented 3 years ago

我的也是5.4.0。 主要是编译的时候遇到了这个问题:

statusor_internals.h:164:76: error: invalid static_cast from type ‘const Status {aka const tensorflow::Status}’ to type ‘stream_executor::port::Status& {aka tensorflow::Status&}’

所以才会问到gcc版本的问题。据说是C++ 14问题,我修改为C++11编译后,更快出问题。

SmileTM commented 3 years ago

我的也是5.4.0。 主要是编译的时候遇到了这个问题:

statusor_internals.h:164:76: error: invalid static_cast from type ‘const Status {aka const tensorflow::Status}’ to type ‘stream_executor::port::Status& {aka tensorflow::Status&}’

所以才会问到gcc版本的问题。据说是C++ 14问题,我修改为C++11编译后,更快出问题。

我觉得 应该不是 gcc的问题吧 我博客上写的 一些 依赖环境包的版本 可能不适用 后续的版本,可能需要你根据相应的tf版本 安装 指定版本的包。 具体可以参考 https://tensorflow.google.cn/install/source 这个链接。 特别是bazel

gmt710 commented 3 years ago

对,tensorflow-v2.3.0支持bazel-3.1.0版本了。 谢谢回复啦,我再根据 https://tensorflow.google.cn/install/source检查一下。