Ubuntu 16.04 + GTX 1080 8G
Asus主機 i7 Ubuntu16.04 + GTX 1080 8G install driver (公司電腦)
CUDA Toolkit v10.0.130 pdf
Step1. 先update and upgrade 一下
$ sudo apt-get update
$ sudo apt-get upgrade
Step2. follow 2.6 去nvidia cuda download
選擇 Linux -> x86_64 -> Ubuntu -> 16.04 ->deb(network選比較小的覺得速度較快哈 )
$ `sudo dpkg -i cuda-repo-ubuntu1604_10.0.130-1_amd64.deb`
$ `sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute
/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub`
When installing using network repo on Ubuntu 17.10:
$ sudo apt-key adv --fetch-keys https:/...
When installing using network repo on Ubuntu 16.04:
$ sudo apt-key adv --fetch-keys http:/...
Ubuntu 17.10 跟 16.04 路徑只差 https 跟 http!!!
$ `sudo apt-get update`
$ `sudo apt-get install cuda`
Step3. follow 3.7.2 Package_Upgrades
$ sudo apt-get install cuda-drivers
Step4. follow 7.1.1 Environment Setup
$ export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
$ export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64\
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Step5. follow 7.3.1 install Third-party Libraries
(不確定需不需要,都裝@@)
$ sudo apt-get install g++ freeglut3-dev build-essential libx11-dev \ libxmu-dev
libxi-dev libglu1-mesa libglu1-mesa-dev
Step6. follow 2.1 Verify you have a CUDA-Capable GPU
$ lspci | grep -i nvidia
follow 2.4
$ sudo apt-get install linux-headers-$(uname -r)
Step7. 檢查一些相關...
$ lspci
$ dmesg
$ lsmod
Step8. follow 4.3.5 Ubuntu Disabling Nouveau
created the file:
$ sudo vim /etc/modprobe.d/blacklist-nouveau.conf
(加入以下)
blacklist nouveau
options nouveau modeset=0
$ sudo update-initramfs -u
Step9. follow 這篇網誌 把path 放到 /etc/profile,(開機就會打開)
$ sudo vim /etc/profile
(加入以下)
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64\
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Step10. 重開機吧~~~~~~
Step11. (如果開機還能用就繼續 step 11. 執行 Test samples)
follow 7.2.2 install Writeable Samples,會在home下產生 /NVIDIA_CUDA-10.0_Samples
$ `cuda-install-samples-10.0.sh .`
Step12. follow 7.2.3.1 Verify the Driver Version
$ cat /proc/driver/nvidia/version
$ nvcc -V
$ cd NVIDIA_CUDA-10.0_Samples
$ cat /proc/cpuinfo ->可以看到電腦幾核心
$ make -j or (make -j8 電腦8核
Step13. follow 7.2.3.3 Running the Binaries
$ cd ~/NVIDIA_CUDA-10.0_Samples/bin/x86_64/linux/release
$ ./deviceQuery
$ ./bandwidthTest
留言
張貼留言