とらりもんHOME  Index  Search  Changes  Login

とらりもん - Gpu Diff

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

$ lspci | grep -i nvidia でGPUの型番が出てこない時:
nishida@tochinoki:~$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1e81 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 10f8 (rev a1)
01:00.2 USB controller: NVIDIA Corporation Device 1ad8 (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation Device 1ad9 (rev a1)
# 解決策:
nishida@tochinoki:~$ sudo update-pciids
Downloaded daily snapshot dated 2020-02-10 03:15:02
nishida@tochinoki:~$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 2080 SUPER] (rev a1)
01:00.1 Audio device: NVIDIA Corporation TU104 HD Audio Controller (rev a1)
01:00.2 USB controller: NVIDIA Corporation TU104 USB 3.1 Host Controller (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU104 USB Type-C UCSI Controller (rev a1)

!Install CUDA in Ubuntu 16.04 (2018/06/05, 2019/03/23 K Nasahara)
* Download deb file from [[https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=debnetwork]]
* sudo dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb
* sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
* sudo apt-get update
* sudo apt-get install cuda
* sudo apt install nvidia-cuda-toolkit
* cd /usr/local
* sudo ln -s cuda-10.1 cuda
* vi ~/.bashrc
export PATH=/usr/local/cuda/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Then reboot! After that, check the following!
* lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
* nvidia-smi -L
GPU 0: GeForce GTX 650 (UUID: GPU-6fa3b725-060c-0f7c-43e0-08d66033f6b4)

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

!! Check the GPU hardware
$ lspci | grep -i nvidia
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)

!! 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|https://developer.nvidia.com/cuda-downloads]].
{{br}}"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
lspci | grep -i nvidia

# watch GPU working
watch -n1 "nvidia-smi"

# 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