- Operation System選Linux
- Architecture選x86_64
- Distribution選Ubuntu(這邊沒有Debian可選,所以選從Debian改出來的Ubuntu)
- Version選16.04
- Installer Type選runfile (local)
- Base Installer:cuda_8.0.61_375.26_linux.run
- cuBLAS Patch 2:cuda_8.0.61.2_linux.run
步驟1:安裝一些需要的東西
- apt-get install libxi libxi6 libxi-dev libglu1-mesa libglu1-mesa-dev libxmu6 libxmu6-dev
步驟2:用Base Installer安裝CUDA-8.0.61
- sh cuda_8.0.61_375.26_linux.run
處理一堆選擇題,紅字是問題的答案:
- Do you accept the previously read EULA?
accept/decline/quit: accept - You are attempting to install on an unsupported configuration. Do you wish to continue?
(y)es/(n)o [ default is no ]: y - Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26?
(y)es/(n)o/(q)uit: n - Install the CUDA 8.0 Toolkit?
(y)es/(n)o/(q)uit: y - Enter Toolkit Location
default is /usr/local/cuda-8.0 :/usr/local/cuda-8.0.61_375.26 - Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: n - Install the CUDA 8.0 Samples?
(y)es/(n)o/(q)uit: y - Enter CUDA Samples Location
/usr/local/cuda-8.0.61_375.26
做完以後,去檢查下面兩的地方有沒有順利安裝:
- CUDA Toolkit:/usr/local/cuda-8.0.61_375.26
- CUDA samples:/usr/local/cuda-8.0.61_375.26/NVIDIA_CUDA-8.0_Samples
步驟3:安裝cuBLAS Patch
- sh cuda_8.0.61.2_linux.run
只要回答兩個問題,紅字是問題的答案:
- Do you accept the previously read EULA?
accept/decline/quit: accept - Enter CUDA Toolkit installation directory
/usr/local/cuda-8.0.61_375.26
步驟4:新增檔案/etc/profile.d/cuda.sh
目的是要之後都找得到CUDA的執行檔與ld library,內容會是export PATH=/usr/local/cuda-8.0.61_375.26/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0.61_375.26/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
步驟5:檢查是否安裝成功,用內附的samples來測試
首先登出後再度登入,然後執行下面指令安裝samples- cd /usr/local/cuda-8.0.61_375.26/NVIDIA_CUDA-8.0_Samples
- make -j 16 2>&1 | tee make.log
- cd /usr/local/cuda-8.0.61_375.26/NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release
- ./deviceQuery
如果有顯示安裝的顯示卡的資訊就代表是順利安裝~
參考資料裡面有許多安裝CUDA-8.0到不同系統的教學
參考文件
- How to install CUDA Toolkit 7.x or 8 on Debian 8 (Jessie) or 9 (Stretch)?
- cuda 8.0 setup at debian
- Ubuntu 16.04上安裝CUDA-8.0
- CentOS 7上安裝CUDA-8.0
- 安裝CUDA Toolkit到Fedora25上
- 安裝CUDA到Mac上
沒有留言:
張貼留言