The following are installed under the condition of stable access to the Internet. If there is no scientific tool, please replace tsinghua Source Ali source, etc

git

sudo apt install git

vim

sudo apt install vim

docker

# Step 1: Install the necessary system tools
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common

# Step 2: Install the GPG certificate
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

# Step 3: Write software source information
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/liunx/ubuntu focal stable"
# # ali source
# sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

# Step 4: Update and install docker-CE
sudo apt-get -y update
sudo apt-get -y install docker-ce
Copy the code

usesudo docker run hello-worldCheck whether the Docker succeeded

nvcc

sudo apt install nvidia-cuda-toolkit

cuda

  1. The first to useubuntu-drivers devicesDetect installable drivers
  2. Install using the version of Recommend, which I have heresudo apt install nvidia-driver-460

Or you can automatically use the recommended versionsudo ubuntu-drivers autoinstallA pink screen will pop up, and you need to set a password (8 ~ 16 characters required)3. Restartsudo rebootAfter the restart will enter the blue background page, at this time do not point to the first option (point after the failure), point to the second option, at this time will need to enter the password just set, enter again after the completion of the installation of the driverUse 4.nvidia-smiCheck whether the driver is successfully installed5. Install according to the instructions on the official websiteCUDA Toolkit Archive | NVIDIA DeveloperIf there is any problem during the installation, refer to itUbuntu 20.04 CUDA&cuDNN installation method _Ashome123 blog -CSDN blogBut many of these steps were installed before I even started6. Final approvalnvcc -VYou can check whether the installation is successful

cuDNN

fromNVIDIA cuDNN | NVIDIA DeveloperAfter decompressing cuda/include/cudnn.h, copy the cuda/include/cudnn.h file to the usr/local/cuda/include folder. Copy all files from cuda/lib64/ to /usr/local/cuda/lib64 and add read permission:sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*