135 shaares
50 private links
50 private links
sudo apt-get update
sudo apt-get -y install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
sudo apt-get --purge -y remove 'cuda*'
sudo apt-get --purge -y remove 'nvidia*'
sudo apt-get autoremove -y
sudo apt-get clean
sudo reboot
# Boot with temporary kernel parameter nomodeset
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
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
echo 'export PATH=/usr/local/cuda-11.1/bin:$PATH' >> ~/.zshrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH' >> ~/.zshrc
sudo nano /etc/default/grub
# Set GRUB_CMDLINE_LINUX="nogpumanager i915.enable_guc=2"
sudo update-grub
# Tell to the NVIDIA configuration tool to switch on NVIDIA graphic card
sudo prime-select nvidia
sudo rm /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
sudo nano /etc/X11/xorg.conf
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
sudo apt purge xserver-xorg-video-intel
sudo reboot
https://developer.nvidia.com/rdp/cudnn-download
tar -xzvf cudnn-11.0-linux-x64-v8.0.5.39.tgz
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
cd /usr/local/cuda/targets/x86_64-linux/lib
sudo ln -sf libcudnn_adv_infer.so.8.0.5 libcudnn_adv_infer.so.8
sudo ln -sf libcudnn_adv_infer.so.8 libcudnn_adv_infer.so
sudo ln -sf libcudnn_adv_train.so.8.0.5 libcudnn_adv_train.so.8
sudo ln -sf libcudnn_adv_train.so.8 libcudnn_adv_train.so
sudo ln -sf libcudnn_cnn_infer.so.8.0.5 libcudnn_cnn_infer.so.8
sudo ln -sf libcudnn_cnn_infer.so.8 libcudnn_cnn_infer.so
sudo ln -sf libcudnn_cnn_train.so.8.0.5 libcudnn_cnn_train.so.8
sudo ln -sf libcudnn_cnn_train.so.8 libcudnn_cnn_train.so
sudo ln -sf libcudnn_ops_infer.so.8.0.5 libcudnn_ops_infer.so.8
sudo ln -sf libcudnn_ops_infer.so.8 libcudnn_ops_infer.so
sudo ln -sf libcudnn_ops_train.so.8.0.5 libcudnn_ops_train.so.8
sudo ln -sf libcudnn_ops_train.so.8 libcudnn_ops_train.so
sudo ln -sf libcudnn.so.8.0.5 libcudnn.so.8
sudo ln -sf libcudnn.so.8 libcudnn.so