日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

ubuntu18.04安装CUDA10.0

發布時間:2023/11/27 生活经验 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu18.04安装CUDA10.0 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1、更新驅動


對于CUDA10.0,要求驅動版本大于410.48,因此首先要更新驅動

ubuntu-drivers devices(查看所有驅動)
sudo ubuntu-drivers autoinstall(自動安裝最適合的驅動)

查看驅動版本

nvidia-smi

2、下載CUDA10.0

https://developer.nvidia.com/cuda-toolkit-archive

選擇10.0版本后,進行如下選擇

下載這個2.0G的。

3、安裝

  • 將下載的包復制到主目錄下
  • 運行以下命令

chmod 777 cuda_10.0.130_410.48_linux.run
sudo ./cuda_10.0.130_410.48_linux.run

  • 在終端中根據提示一步一步操作,如下所示,這里面特別要留意:不要安裝顯卡驅動。
Do you accept the previously read EULA?
accept/decline/quit: acceptInstall NVIDIA Accelerated Graphics Driver for Linux-x86_64 410.48?
(y)es/(n)o/(q)uit: nInstall the CUDA 10.0 Toolkit?
(y)es/(n)o/(q)uit: yEnter Toolkit Location[ default is /usr/local/cuda-10.0 ]: Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: yInstall the CUDA 10.0 Samples?
(y)es/(n)o/(q)uit: yEnter CUDA Samples Location[ default is /home/test ]: Installing the CUDA Toolkit in /usr/local/cuda-10.0 ...
  • 安裝結束,終端中會顯示如下信息:
Installing the CUDA Toolkit in /usr/local/cuda-10.0 ...
Missing recommended library: libGLU.so
Missing recommended library: libX11.so
Missing recommended library: libXi.so
Missing recommended library: libXmu.soInstalling the CUDA Samples in /home/test ...
Copying samples to /home/test/NVIDIA_CUDA-10.0_Samples now...
Finished copying samples.===========
= Summary =
===========Driver:   Not Selected
Toolkit:  Installed in /usr/local/cuda-10.0
Samples:  Installed in /home/test, but missing recommended librariesPlease make sure that-   PATH includes /usr/local/cuda-10.0/bin-   LD_LIBRARY_PATH includes /usr/local/cuda-10.0/lib64, or, add /usr/local/cuda-10.0/lib64 to /etc/ld.so.conf and run ldconfig as rootTo uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-10.0/binPlease see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-10.0/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 384.00 is required for CUDA 10.0 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 -driverLogfile is /tmp/cuda_install_8442.log
  • 安裝缺失的包
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev 

4、配置環境變量

sudo gedit ~/.bashrc

  • 在末尾寫入
# for CUDA 10.0
export CUDA_10_0_HOME=/usr/local/cuda-10.0
export PATH=$PATH:$CUDA_10_0_HOME/bin 
export LD_LIBRARY_PATH=CUDA_10_0_HOME/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

  • 運行環境變量

source ~/.bashrc

5、驗證

cd /usr/local/cuda/samples/1_Utilities/deviceQuery
./deviceQuery

nvcc --version

cat /usr/local/cuda/version.txt

總結

以上是生活随笔為你收集整理的ubuntu18.04安装CUDA10.0的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。