方法1
$ sudo apt remove gcc-5
$ sudo apt install gfortran
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt update
$ sudo apt install g++-7 -y
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
$ sudo update-alternatives --config gcc
$ gcc --version
$ g++ --version
$ sudo dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
$ sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
(sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub)
$ sudo apt-get update
$ sudo apt-get install cuda
$ lspci | grep -i nvidia
$ uname -m && cat /etc/*release
$ gcc --version
$ uname -r
$ sudo apt-get install linux-headers-$(uname -r)
$ md5sum <file>
(md5sum cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb)
"Handle Conflicting Installation Methods"無法執行$ sudo dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb
(sudo dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb)
$ sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
(sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub)
$ sudo apt-get update
$ sudo apt-get install cuda
$ 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}}
$ sudo systemctl enable nvidia-persistenced
$ sudo cp /lib/udev/rules.d/40-redhat.rules /etc/udev/rules.d
(sudo cp /lib/udev/rules.d/40-vm-hotadd.rules /etc/udev/rules.d)
$ sudo sed -i '/SUBSYSTEM=="memory", ACTION=="add"/d' /etc/udev/rules.d/40-redhat.rules
(sudo sed -i '/SUBSYSTEM=="memory", ACTION=="add"/d' /etc/udev/rules.d/40-vm-hotadd.rules)
$ sudo /usr/bin/nvidia-persistenced --verbose
$ cuda-install-samples-10.0.sh <dir>
(裝在家目錄)
$ cat /proc/driver/nvidia/version
$ cd NVIDIA_CUDA-10.0_Samples/
$ make
$ cd 1_Utilities/deviceQuery
$ ./deviceQuery
$ sudo apt install selinux-utils
$ setenforce 0
$ sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
安裝Nsight Eclipse Plugins
https://docs.nvidia.com/cuda/nsightee-plugins-install-guide/index.html
https://www.eclipse.org/downloads/packages/
https://www.youtube.com/watch?v=3r5BWb_MUxA
方法2
1. 官方下載runfile (local)安裝檔到家目錄
2. ctrl+atl+F1進入文字介面
3. 取消X service
$ sudo service lightdm stop
4. 避免顯卡(NVIDIA 1070)驅動衝突
$ sudo apt-get install nvidia-410 nvidia-modprobe nvidia-settings
$ sudo apt-get remove --purge nvidia-410 nvidia-modprobe nvidia-settings
5. 安裝
$ sudo sh cuda_10.0.130_410.48_linux.run
6. 重開機
$ reboot
$ sudo apt-get update
$ sudo apt-get install cuda
$ lspci | grep -i nvidia
$ uname -m && cat /etc/*release
$ gcc --version
$ uname -r
$ sudo apt-get install linux-headers-$(uname -r)
$ md5sum <file>
(md5sum cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb)
"Handle Conflicting Installation Methods"無法執行$ sudo dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb
(sudo dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb)
$ sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
(sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub)
$ sudo apt-get update
$ sudo apt-get install cuda
$ 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}}
$ sudo systemctl enable nvidia-persistenced
$ sudo cp /lib/udev/rules.d/40-redhat.rules /etc/udev/rules.d
(sudo cp /lib/udev/rules.d/40-vm-hotadd.rules /etc/udev/rules.d)
$ sudo sed -i '/SUBSYSTEM=="memory", ACTION=="add"/d' /etc/udev/rules.d/40-redhat.rules
(sudo sed -i '/SUBSYSTEM=="memory", ACTION=="add"/d' /etc/udev/rules.d/40-vm-hotadd.rules)
$ sudo /usr/bin/nvidia-persistenced --verbose
$ cuda-install-samples-10.0.sh <dir>
(裝在家目錄)
$ cat /proc/driver/nvidia/version
$ cd NVIDIA_CUDA-10.0_Samples/
$ make
$ cd 1_Utilities/deviceQuery
$ ./deviceQuery
$ sudo apt install selinux-utils
$ setenforce 0
$ sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
安裝Nsight Eclipse Plugins
https://docs.nvidia.com/cuda/nsightee-plugins-install-guide/index.html
https://www.eclipse.org/downloads/packages/
https://www.youtube.com/watch?v=3r5BWb_MUxA
方法2
1. 官方下載runfile (local)安裝檔到家目錄
2. ctrl+atl+F1進入文字介面
3. 取消X service
$ sudo service lightdm stop
4. 避免顯卡(NVIDIA 1070)驅動衝突
$ sudo apt-get install nvidia-410 nvidia-modprobe nvidia-settings
$ sudo apt-get remove --purge nvidia-410 nvidia-modprobe nvidia-settings
5. 安裝
$ sudo sh cuda_10.0.130_410.48_linux.run
6. 重開機
$ reboot
沒有留言:
張貼留言