Ubuntu12.04配置NVIDIA cuda5.5经验帖

之前配过一遍都忘光了,现在要重新配一遍真是好难过。。。特此记录参考网站以便查阅。


=============

环境:Ubuntu 12.04+Cuda5.5


1. 判断安装环境:

The setup of CUDA development tools on a system running the appropriate version of Linux consists of a few simple steps:

  • Verify the system has a CUDA-capable GPU.
  • Verify the system has a supported version of Linux.
  • Verify the system has gcc installed.
官方配置手册:http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html

2. 下载镜像:

https://developer.nvidia.com/cuda-downloads

下run好了


3. 安装必要的库

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev  
  2. libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev  

4. 删除已有nvidia,拉黑名单

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. sudo apt-get remove --purge nvidia*  
  2. sudo nano /etc/modprobe.d/blacklist.conf  

blacklist.conf加入

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. lacklist amd76x_edac  
  2. blacklist vga16fb  
  3. blacklist nouveau  
  4. blacklist rivafb  
  5. blacklist nvidiafb  
  6. blacklist rivatv  

5. Ctrl+Alt+F1, 登陆后安装

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. sudo service lightdm stop  
  2. chmod +x cuda_5.5.22_linux_64.run  
  3. sudo ./cuda_5.5.22_linux_64.run  


Cuda5.5集成了toolkit,sdk和driver, 所以安装的时候一路同意下来就好了


6. 得到以下安装结果

    Driver:   Installed
    Toolkit:  Installed In /Usr/Local/Cuda-5.0
    Samples:  Installation Failed. Missing Required Libraries.

也就是SDK安装失败,这个官方手册上也提到了解决方案。


7. 单独安装SDK

解压sdk:

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. sh cuda_5.5.22_linux_64.run -extract=/path/to/extract/dir/  

到根目录下的 /path/to/extract/dir/去找c uda-samples_5.5.22_*******.run, 安装

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. sh cuda-samples_5.5.22_*******.run  


8. Path配置:

$sudo gedit etc/profile或~/.bashrc

[plain]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. export PATH=$PATH:/usr/local/cuda-5.5/bin  
  2. export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib64:/lib  

使之生效:

source /etc/profile(对应profile)或sudo ldconfig(对应bashrc)


还有一种装sdk的方法见http://askubuntu.com/questions/338907/how-to-install-cuda-5-5-under-ubuntu-12-04-lts-64-bit


9. 验证

见官网http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#verify-installation


10. Cuda Hello World:

https://devtalk.nvidia.com/default/topic/486692/cuda-programming-and-performance/guide-installing-cuda-sdk-on-linux-walkthrough-on-how-to-install-the-cuda-sdk-and-build-the-example/

正文最下方


=============

此外附上其他配置参考:

1. theano+python模块

(Ubuntu 12.04自带python不用装,但要注意系统里很多模块依赖python,没事不要随便删!!!)

http://www.cnblogs.com/Ponys/p/3438491.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值