Ubuntu_20.04_Configuration
Summary: Recording my configuration for Ubuntu 20.04.
Contents:
- 1. Introduction
- 2. Must-have softwares
- 3. Installing Nvidia driver, cuda toolkit, cudnn
- 4. Installing Github desktop
- Reference
1. Introduction
In this blog, I record my configurations when installing new Ubuntu 20.04 on my desktop.
2. Must-have softwares
-
VS Code
-
Google Chrome
-
Github Desktop
-
Chinese Pinyin input
-
More…
3. Installing Nvidia driver, cuda toolkit, cudnn
3.1 Installing Nvidia driver
Run ubuntu-drivers devices
to check available drivers to your graphics.
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F06sv00001028sd0000C756bc03sc00i00
vendor : NVIDIA Corporation
model : TU106 [GeForce RTX 2060 SUPER]
driver : nvidia-driver-510-server - distro non-free
driver : nvidia-driver-470 - distro non-free recommended
driver : nvidia-driver-510 - distro non-free
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-450-server - distro non-free
driver : xserver-xorg-video-nouveau - distro free builtin
I install nvidia-driver-510:
sudo apt update && sudo apt install nvidia-driver-510
Reboot the system, nvidia-smi
will show the following information:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.54 Driver Version: 510.54 CUDA Version: 11.6 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
| 31% 38C P8 11W / 175W | 77MiB / 8192MiB | 21% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1306 G /usr/lib/xorg/Xorg 22MiB |
| 0 N/A N/A 1973 G /usr/lib/xorg/Xorg 53MiB |
+-----------------------------------------------------------------------------+
3.2 Installing cuda toolkit
Go to https://developer.nvidia.com/cuda-downloads to download CUDA.
The current latest version is 11.6. If you want older version, you can google like “nvidia cuda 11.3”, the corresponding version will show up. Here, I download and install cuda 11.6.
Download the run file:
wget https://developer.download.nvidia.com/compute/cuda/11.6.2/local_installers/cuda_11.6.2_510.47.03_linux.run
cd to the folder, try
sudo sh cuda_11.6.2_510.47.03_linux.run
.
Then you will see message like “The package manager is already exist, please remove,… abort”.
So we run
sudo sh cuda_11.6.2_510.47.03_linux.run --override --silent --toolkit
This works for my case.
Add path:
sudo gedit ~/.bashrc
Add below lines in the file:
export PATH=/usr/local/cuda-11.6/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.6/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
source ~/.bashrc
Now type nvcc -V
in the terminal, the version of cuda will show up.
vcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_Mar__8_18:18:20_PST_2022
Cuda compilation tools, release 11.6, V11.6.124
Build cuda_11.6.r11.6/compiler.31057947_0
3.3 Installing cudnn
Go to here, follow the instructions to download cudnn.
unzip the downloaded cudnn file, and copy them to the cuda folder.
sudo cp cudnn_file_name/include/cudnn*.h /usr/local/cuda/include
sudo cp cudnn_file_name/lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
4. Installing Github desktop
There is no official version of github desktop.
Downlaod the latest version:
- Go to the release page to download
*.deb
file - or
sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.6.3-linux1/GitHubDesktop-linux-2.6.3-linux1.deb
Installing gdebi-core:
sudo apt-get install gdebi-core
Installing Github desktop:
sudo gdebi /home/your_username/GitHubDesktop-linux-2.6.3-linux1.deb
Comments