Ubuntu deep learning environment configuration

1. Graphics card driver

  • Download the corresponding driver https://www.nvidia.cn/Download/index.aspx?lang=cn
  • Uninstall the original driversudo apt-get remove --purge nvidia*
  • Disable nouveau (nouveau is the generic driver)sudo gedit /etc/modprobe.d/blacklist.conf 或者(blacklist-nouveau.conf)
  • Add at the end of the opened blacklist.conf
blacklist nouveau
options nouveau modeset=0
  • After saving, enter the following in the terminal and update
sudo update-initramfs –u
  • After waiting, restart the computer. After restarting, enter the following in the terminal. If there is no output, the shielding is successful.lsmod | grep nouveau

  • Install lightdm, lightdm is the display manager

sudo apt-get install lightdm
  • Install the driver: type in the terminalsudo telinit 3

  • To return to the GUI inputsudo telinit 5

  • Enter your username and password to log in. cd into the directory where you downloaded the driver and enter the commandsudo chmod 777 NVIDIAxxxx.run

  • sudo ./NVIDIA-Linux-x86_64-430.26.run

nvidia-smi

insert image description here

2. GCC

sudo apt update
sudo apt install build-essential
gcc --version

insert image description here

3. MIRACLES

cuda download address, https://developer.nvidia.com/cuda-toolkit-archive

wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run
sudo sh cuda_11.3.0_465.19.01_linux.run
insert image description here

nvcc -V

insert image description here

cp -fr include/* /usr/local/cuda-11.3/include/
cp -fr lib64/* /usr/local/cuda-11.3/lib64/

4. Anaconda

Official website address, https://www.anaconda.com/products/individual#linux

wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh

5. Other python related libraries

Guess you like

Origin blog.csdn.net/weixin_42990464/article/details/123680243