加入收藏 | 设为首页 | 会员中心 | 我要投稿 开发网_开封站长网 (http://www.0378zz.com/)- 科技、AI行业应用、媒体智能、低代码、办公协同!
当前位置: 首页 > 运营中心 > 网站设计 > 教程 > 正文

ubuntu14.4情形下搭建tensorflow情形

发布时间:2016-10-28 16:17:24 所属栏目:教程 来源:站长网
导读:1 说明:本机环境ubuntu14.4——64位,gtx970显卡。我是使用下载好的安装包进行安装,tensorflow使用源码安装。 2 需要准备的材料,Anaconda2-4.2.0-Linux-x86_64.sh,cuda_8.0.44_linux.run.这些东西需要自己上网找到对应版本。 3 安装anaconda, 1)添加可

1 说明:本机环境ubuntu14.4——64位,gtx970显卡。我是使用下载好的安装包进行安装,tensorflow使用源码安装。

 

2 需要准备的材料,Anaconda2-4.2.0-Linux-x86_64.sh,cuda_8.0.44_linux.run.这些东西需要自己上网找到对应版本。

 

3 安装anaconda,

  1)添加可执行权限,chmod +x Anaconda2-4.2.0-Linux-x86_64.sh

  2)安装,sudo bash Anaconda2-4.2.0-Linux-x86_64.sh

 

4 更新gcc编译器,因为cuda需要使用gcc编译器,gcc版本>=4.8.2.详情请查看官网配置。我的机器看了一下gcc版本4.8.4,所以可以不用升级。

 

5 安装cuda8,官方文档

  

 1. Disable the Nouveau drivers:
 1). Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0
2). Regenerate the kernel initramfs: $ sudo update-initramfs -u
2. Reboot into runlevel 3 by temporarily adding the number "3" and the word "nomodeset" to the end of the system's kernel boot parameters.
说明:runlevel3意思就是关闭桌面显示登陆,我们可以使用下面的方案代替
  1)sudo shutdown -r now
  2)进入命令行模式ctrl+shift+f1
  3)关闭lightdm,sudo service lightdm stop
 3. Run the installer silently to install with the default selections (implies acceptance of
the EULA):
sudo sh cuda_<version>_linux.run --silent
说明:此过程有点长,慢慢等就好了。再装过后提示缺少一些库,现在安装即可
Missing recommended library: libGLU.so
Missing recommended library: libX11.so
Missing recommended library: libXi.so
Missing recommended library: libXmu.so

使用以下命令进行安装
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
令人抓狂的是就算按照这个装也没有成功,提示如下信息

The following packages have unmet dependencies:


unity-control-center:      Depends:libcheese-gtk23(>=3.4.0) but it is not going to be installed


                                  Depends:libcheese7(>=3.0.1) but it is not going to be installed

最后决定尝试另外一种办法。下面的过程是官网的指导。
4. Create an xorg.conf file to use the NVIDIA GPU for display: $ sudo nvidia-xconfig 5. Reboot the system to load the graphical interface. 6. Set up the development environment by modifying the PATH and LD_LIBRARY_PATH variables: $ export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} $ export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64 ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

 6 安装cuda8方案二

 

(编辑:开发网_开封站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读