Ubuntu Server 20.04 system installation (4): deep learning GPU environment configuration (CUDA Toolkit 11.7+cuDNN v8.4.1) [Restart to take effect] [Gnome is installed by default after installation and needs to be manually deleted]

Introduction

This article takes the Ubuntu 20.04 operating system as an example to demonstrate how to configure a deep learning GPU environment. For convenience, we can directly skip the installation of the NVIDIA graphics card driver here, because it will be installed automatically when CUDA is installed.

Preparation

Before starting the installation, you need to modify the mirror source of apt-get, otherwise the domestic download speed will be very slow. Here we take Aliyuan as an example to demonstrate how to modify it.

  1. backup official sources
sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

Run sudo vi /etc/apt/sources.list to open the file, and press i to insert the following content, press ESC and then press :wq save and exit

sudo vi /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

# deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  1. Update data source list
sudo apt-get update

Install

CUDA Toolkit 11.7

For installation, refer to the tutorial provided by NVIDIA official website.

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-ubuntu2004-11-7-local_11.7.0-515.43.04-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-7-local_11.7.0-515.43.04-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2004-11-7-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda

sudo reboot # not required

After performing the above installation operations, you need to configure environment variables so that all users under the system can use:

  1. Open the global configuration file
sudo vi /etc/profile
  1. Save and exit after adding the following content at the end of the file.
export PATH=/usr/local/cuda-11.7/bin${PATH: + :${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.7/lib64\S${LD_LIBRARY_PATH: + :${LD_LIBRARY_PATH}}
  1. activate environment variable
source /etc/profile
  1. Run nvcc -V to verify whether the installation is successful, if the version number is displayed correctly, the installation is successful
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0

cuDNN v8.4.1

Refer to the official tutorial provided by NVIDIA for installation.

  1. Download the appropriate version of the offline installation package from the official website


2. Start the installation

sudo dpkg -i cudnn-local-repo-ubuntu2004-8.4.1.50_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2004-8.4.1.50/cudnn-local-E3EC4A60-keyring.gpg /usr/share/keyrings/
cd /var/cudnn-local-repo-ubuntu2004-8.4.1.50/
sudo dpkg -i libcudnn8_8.4.1.50-1+cuda11.6_amd64.deb
sudo dpkg -i libcudnn8-dev_8.4.1.50-1+cuda11.6_amd64.deb
sudo dpkg -i libcudnn8-samples_8.4.1.50-1+cuda11.6_amd64.deb
  1. Verify that the installation is successful (final output Test passed! means the installation is successful)
cp -r /usr/src/cudnn_samples_v8/ $HOME
cd $HOME/cudnn_samples_v8/mnistCUDNN
make clean & amp; & amp; make
./mnistCUDNN

If you encounter the following error when verifying the installation:

```bash
test.c:1:10: fatal error: FreeImage.h: No such file or directory
    1 | #include "FreeImage.h"
      | ^~~~~~~~~~~~~
compilation terminated.
>>> WARNING - FreeImage is not set up correctly. Please ensure FreeImage is set up correctly. <<<

It can be solved by the following methods, and then re-check

sudo apt-get -y install libfreeimage3 libfreeimage-dev

Verification passed after reboot

sudo reboot

Verification passed:

wyr@ubuntu2004w1:~/cudnn_samples_v8/mnistCUDNN$ ./mnistCUDNN
Executing: mnistCUDNN
cudnnGetVersion() : 8401 , CUDNN_VERSION from cudnn.h : 8401 (8.4.1)
Host compiler version : GCC 9.4.0

There are 2 CUDA capable devices on your machine:
device 0 : sms 56 Capabilities 6.0, SmClock 1328.5 Mhz, MemSize (Mb) 16280, MemClock 715.0 Mhz, Ecc=1, boardGroupID=0
device 1 : sms 56 Capabilities 6.0, SmClock 1328.5 Mhz, MemSize (Mb) 16280, MemClock 715.0 Mhz, Ecc=1, boardGroupID=1
Using device 0

Testing single precision
Loading binary file data/conv1.bin
Loading binary file data/conv1.bias.bin
Loading binary file data/conv2.bin
Loading binary file data/conv2.bias.bin
Loading binary file data/ip1.bin
Loading binary file data/ip1.bias.bin
Loading binary file data/ip2.bin
Loading binary file data/ip2.bias.bin
Loading image data/one_28x28.pgm
Performing forward propagation... ?
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 57600 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 178432 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 184784 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 2057744 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.024864 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.025152 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.066912 time requiring 57600 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.097024 time requiring 178432 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.144352 time requiring 2057744 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.275520 time requiring 184784 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 128000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 4656640 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 2450080 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.062560 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.062880 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.107712 time requiring 2450080 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.114528 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.116704 time requiring 128000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.130944 time requiring 4656640 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Resulting weights from Softmax:
0.0000000 0.9999399 0.0000000 0.0000000 0.0000561 0.0000000 0.0000012 0.0000017 0.0000010 0.0000000
Loading image data/three_28x28.pgm
Performing forward propagation... ?
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 57600 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 178432 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 184784 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 2057744 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.024512 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.040768 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.052480 time requiring 57600 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.067328 time requiring 2057744 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.069856 time requiring 178432 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.077664 time requiring 184784 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 128000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 4656640 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 2450080 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.062336 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.064128 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.077600 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.079904 time requiring 2450080 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.113632 time requiring 128000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.123968 time requiring 4656640 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Resulting weights from Softmax:
0.0000000 0.0000000 0.0000000 0.9999288 0.0000000 0.0000711 0.0000000 0.0000000 0.0000000 0.0000000
Loading image data/five_28x28.pgm
Performing forward propagation... ?
Resulting weights from Softmax:
0.0000000 0.0000008 0.0000000 0.0000002 0.0000000 0.9999820 0.0000154 0.0000000 0.0000012 0.0000006

Result of classification: 1 3 5

Test passed!

Testing half precision (math in single precision)
Loading binary file data/conv1.bin
Loading binary file data/conv1.bias.bin
Loading binary file data/conv2.bin
Loading binary file data/conv2.bias.bin
Loading binary file data/ip1.bin
Loading binary file data/ip1.bias.bin
Loading binary file data/ip2.bin
Loading binary file data/ip2.bias.bin
Loading image data/one_28x28.pgm
Performing forward propagation... ?
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 5632 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 28800 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 178432 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 184784 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 2057744 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.026944 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.052864 time requiring 28800 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.064928 time requiring 178432 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.073376 time requiring 2057744 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.093312 time requiring 184784 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.109312 time requiring 5632 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 4656640 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 2450080 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 2000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.087264 time requiring 2450080 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.088320 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.088864 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.097152 time requiring 2000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.122624 time requiring 4656640 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.195200 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Resulting weights from Softmax:
0.0000001 1.0000000 0.0000001 0.0000000 0.0000563 0.0000001 0.0000012 0.0000017 0.0000010 0.0000001
Loading image data/three_28x28.pgm
Performing forward propagation... ?
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 5632 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 28800 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 178432 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 184784 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 2057744 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.026272 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.047712 time requiring 28800 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.068864 time requiring 2057744 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.069856 time requiring 5632 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.075904 time requiring 184784 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.097664 time requiring 178432 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnGetConvolutionForwardAlgorithm_v7...
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: -1.000000 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: -1.000000 time requiring 4656640 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: -1.000000 time requiring 2450080 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: -1.000000 time requiring 2000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Testing cudnnFindConvolutionForwardAlgorithm...
^^^^ CUDNN_STATUS_SUCCESS for Algo 4: 0.079712 time requiring 2450080 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 1: 0.079808 time requiring 2000 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 7: 0.083232 time requiring 1433120 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 0: 0.088128 time requiring 0 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 5: 0.117088 time requiring 4656640 memory
^^^^ CUDNN_STATUS_SUCCESS for Algo 2: 0.185120 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 6: -1.000000 time requiring 0 memory
^^^^ CUDNN_STATUS_NOT_SUPPORTED for Algo 3: -1.000000 time requiring 0 memory
Resulting weights from Softmax:
0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000714 0.0000000 0.0000000 0.0000000 0.0000000
Loading image data/five_28x28.pgm
Performing forward propagation... ?
Resulting weights from Softmax:
0.0000000 0.0000008 0.0000000 0.0000002 0.0000000 1.0000000 0.0000154 0.0000000 0.0000012 0.0000006

Result of classification: 1 3 5

Test passed!
wyr@ubuntu2004w1:~/cudnn_samples_v8/mnistCUDNN$

After installing CUDA, it became a desktop version, which made me wonder, so I had to uninstall one by one

# Uninstall gnome
sudo apt-get remove gnome -y
# Uninstall gnome-shell
sudo apt-get remove gnome-shell -y
# Completely uninstall and delete the relevant configuration files of gnome
sudo apt-get purge gnome -y
# Uninstall bloated service components
sudo apt-get remove snapd -y
# Uninstall dependencies
sudo apt-get autoremove -y
# Clean up the cached program packages left when installing gnome
sudo apt-get autoclean
sudo apt-get clean
# restart the system
sudo reboot
sudo shutdown -r now

GPUstat

This is a tool that can replace nvidia-smi to view graphics card information. You can clearly see the temperature, utilization rate, users who are using each graphics card, and the video memory occupied by each user.

Install using the following command:

sudo apt install python3-pip
sudo pip install gpustat

The usage is very simple, just remember the following command:

gpustat -i

NetSM

This is a cross-platform command line network speed monitoring tool, you can see the real-time network speed display of the server.

Install with the following command:

sudo apt install python3-pip
sudo pip install netsm

The usage is very simple, just remember the following command:

netsm show

Tmux

When running a task that takes a long time, you can open tmux to suspend the task. Even if you close the window, the task is still running in the background.

sudo apt-get install tmux

Axel

A multi-thread download tool that is different from wget single-thread download. The usage is very simple, just specify the number of threads through the -n parameter, for example: axel -n 10 download link.

sudo apt-get install axel

Hint

Three deep learning GPU environments are configured above, namely PyTorch, TensorFlow 2 and TensorFlow 1. And are configured by the administrator. When other ordinary users use it, they only need to use conda to clone when creating a new environment. Here is an example.

For example, an ordinary user wants to use the PyTorch environment, but he also needs to install the requests package, which cannot be installed directly in the environment named pytorch because of the lack of write permissions. Therefore, it can be installed by cloning as follows:

conda create -n pytorch2 --clone pytorch
conda activate pytorch2
pip install requests

This not only saves the storage space of the server, but also avoids the annoyance of repeated installation environments.

Of course, if you don’t clone, it’s also possible to activate it directly:

conda activate pytorch
pip install requests

Because requests will be installed in the user’s home directory by default, it will not conflict with other users’ environments. But if there are many environments, it is not easy to distinguish them.

Reference

Easy record: install GPU driver, CUDA and cuDNN
What must be done to configure the environment for machine learning using ubuntu 20.04
[Linux] Install and use miniconda on Ubuntu
Administering a multi-user conda installation
Start Locally | PyTorch
Anaconda image usage help
Install TensorFlow using pip

[Linux] Ubuntu 20.04 deep learning GPU environment configuration (CUDA Toolkit 11.7 + cuDNN v8.4.1)_Xavier Jiezou’s Blog-CSDN Blog

The gnome desktop environment is installed after the ubuntu20.04 TLS Server upgrade – Programmer Sought

The knowledge points of the article match the official knowledge files, and you can further learn relevant knowledgePython introductory skill treepreliminary knowledgeInstall Python294160 people are learning the system