Help us understand the problem. What is going on with this article?

UbuntuにCUDAをインストールする方法

More than 1 year has passed since last update.

前回、UbuntuにNVIDIAドライバをインストールしたので、今回はCUDAをインストールしてみました。

前準備

~$ sudo apt update
~$ sudo apt upgrade

CUDAのインストール

~$ sudo dpkg -i cuda-repo-ubuntu1704-9-0-local_9.0.176-1_amd64.deb
~$ sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
~$ sudo apt-get update
~$ sudo apt-get install cuda
~$ sudo apt-get install nvidia-384
~$ sudo reboot

PATHの設定

~/.bashrcの末尾に以下を追加する。

export PATH=/usr/local/cuda-9.0/bin:${PATH}
export LD_LIBRARY_PATH=usr/local/cuda-9.0/lib64:${LD_LIBRARY_PATH}

PATHの確認

~$ echo $PATH    # /usr/local/cuda-9.0/bin'
~$ echo $LD_LIBRARY_PATH  # '/usr/local/cuda-9.0/lib64'
~$ which nvcc    # '/usr/local/cuda-9.0/bin/nvcc'
~$ nvidia-smi    # nvidiaのGPUの情報が表示される
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away