2019年10月16日 更新
C茄谩赖条! 不要用 cuda_10.1.168_418.67_linux.run 這個版本蜈缤,非root沒有成功天试。。峭状。而咆,
- 下載 https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.105_418.39_linux.run
chmod +x cuda_10.1.168_418.67_linux.run
./cuda_10.1.168_418.67_linux.run
3 . accpet
┌──────────────────────────────────────────────────────────────────────────────┐
│ End User License Agreement │
│ -------------------------- │
│ │
│ NVIDIA Software License Agreement and CUDA Supplement to │
│ Software License Agreement. │
│ │
│ │
│ Preface │
│ ------- │
│ │
│ The Software License Agreement in Chapter 1 and the Supplement │
│ in Chapter 2 contain license terms and conditions that govern │
│ the use of NVIDIA software. By accepting this agreement, you │
│ agree to comply with all the terms and conditions applicable │
│ to the product(s) included herein. │
│ │
│ │
│ NVIDIA Driver │
│ │
│ │
│──────────────────────────────────────────────────────────────────────────────│
│ Do you accept the above EULA? (accept/decline/quit): │
│ accept │
└──────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────┐
│ CUDA Installer │
│ - [ ] Driver │
│ [ ] 418.67 │
│ + [X] CUDA Toolkit 10.1 │
│ [X] CUDA Samples 10.1 │
│ [X] CUDA Demo Suite 10.1 │
│ [X] CUDA Documentation 10.1 │
│ Options │
│ Install │
│ │
│ │
│ Up/Down: Move | Left/Right: Expand | 'Enter': Select | 'A': Advanced options │
└──────────────────────────────────────────────────────────────────────────────┘
默認(rèn)前面的 X
表示選中, 方向鍵移動摇肌,Driver要取消无午,
- 在第二行
+ [X] CUDA Toolkit 10.1
媒役,按A
,進(jìn)入Advanced options , 如下所示:
┌──────────────────────────────────────────────────────────────────────────────┐
│ CUDA Toolkit │
│ Change Toolkit Install Path │
│ [ ] Create symbolic link from /usr/local/cuda │
│ - [ ] Create desktop menu shortcuts │
│ [ ] All users │
│ [ ] Yes │
│ [ ] No │
│ [ ] Install manpage documents to /usr/share/man │
│ Done │
│ │
│ Up/Down: Move | Left/Right: Expand | 'Enter': Select | 'A': Advanced options │
└──────────────────────────────────────────────────────────────────────────────┘
在Change Toolkit Install Path
一行上面Enter
, 進(jìn)入修改路徑:修改為非root的路徑
┌──────────────────────────────────────────────────────────────────────────────┐
│ Change Toolkit Install Path │
│ /home/xxx/local/cuda-10.1/ │
│ │
│ │
│ 'Enter': Finish │
└──────────────────────────────────────────────────────────────────────────────┘
確認(rèn)后祝谚,取消上上幅圖的所有宪迟,最后如上上圖所示。
- 修改
Options
選項下面的 default path.
選擇一個自己的/home/xxx/Documents
Note: 這個路徑最后不要帶/
update: 這個地方的路徑是cublas*
文件的路徑交惯,所以要選擇上面安裝的cuda的路徑home/xxx/local/cuda-10.1
不修改的話可能會有以下的錯誤:
[WARNING]: Unable to write to directory: /usr/lib/x86_64-linux-gnu/
[ERROR]: Unable to write to /usr/lib/x86_64-linux-gnu/! Change default library locations using --librarypath=<path>
Install 即可次泽!
安裝成功:
===========
= Summary =
===========
Driver: Not Selected
Toolkit: Installed in /home/xxx/usr/local/cuda-10.2/
Samples: Not Selected
Please make sure that
- PATH includes /home/xxx/usr/local/cuda-10.2/bin
- LD_LIBRARY_PATH includes /home/xxx/usr/local/cuda-10.2/lib64, or, add /home/xxx/usr/local/cuda-10.2/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run cuda-uninstaller in /home/xxx/usr/local/cuda-10.2/bin
Please see CUDA_Installation_Guide_Linux.pdf in /home/xxx/usr/local/cuda-10.2/doc/pdf for detailed information on setting up CUDA.
***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 440.00 is required for CUDA 10.2 functionality to work.
To install the driver using this installer, run the following command, replacing <CudaInstaller> with the name of this run file:
sudo <CudaInstaller>.run --silent --driver
Logfile is /tmp/cuda-installer.log