とらりもんHOME  Index  Search  Changes  Login

GPU

Things to do, after you got graphic board. 2017/12/15 Ishibashi

Nvidia and CUDA installation.

sudo apt-cache search 'nvidia-[0-9]+$'
↑It shows available nvidia driver versions.
sudo apt-get install nvidia-??? # you choose one driver version.
sudo apt-get install nvidia-387
sudo apt-get install nvidia-387-dev
sudo apt-get install nvidia-modprobe
sudo apt-get install nvidia-opencl-icd-387
sudo apt-get install nvidia-prime
sudo apt-get install nvidia-settings

you can download CUDA installer here.
"runfile" is used in this case below.

./cuda_9.1.85_387.26_linux.run

## Write those sentences below on ".bashrc".
export PATH=/usr/local/cuda-9.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda

sudo apt-get install cuda
sudo apt update
sudo apt upgrade
sudo reboot now

Helpful commands

# GPU model.
nvidia-smi -L
lspci | grep -i nvidia

# Nvidia driver version.
cat /proc/driver/nvidia/version

# CUDA version.
nvcc -V

# Installed packages.
dpkg -l | grep cuda
dpkg -l | grep nvidia

install other packages.

pip install cupy --no-cache-dir -vvvv
# sudo apt install nvidia-cuda-toolkit # This command is somehow destructive.
sudo apt install nvidia-cuda-toolkit

Last modified:2017/12/27 09:49:47
Keyword(s):
References: