之前配過一遍都忘光了,現在要重新配一遍真是好難過。。。特此記錄參考網站以便查閱。
=============
環境: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. 安裝必要的庫
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-devlibxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev
4. 刪除已有nvidia,拉黑名單
sudo apt-get remove --purge nvidia*sudo nano /etc/modprobe.d/blacklist.conf
blacklist.conf加入
lacklist amd76x_edacblacklist vga16fbblacklist nouveaublacklist rivafbblacklist nvidiafbblacklist rivatv
5. Ctrl+Alt+F1, 登陸後安裝
sudo service lightdm stopchmod +x cuda_5.5.22_linux_64.runsudo ./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:
sh cuda_5.5.22_linux_64.run -extract=/path/to/extract/dir/
到根目錄下的/path/to/extract/dir/去找cuda-samples_5.5.22_*******.run, 安裝
sh cuda-samples_5.5.22_*******.run
8. Path配置:
$sudo gedit etc/profile或~/.bashrc
export PATH=$PATH:/usr/local/cuda-5.5/binexport 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
感興趣的小夥伴請關注本人部落格和微博Rachel____Zhang
PS:CSDN新加的驗證碼功能好坑爹啊,人眼都看不清!試了6次才發出去。。。