SHARE
TWEET

Untitled

a guest Oct 21st, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #uninstall Cuda and NVidia
  2.  
  3. sudo apt-get remove nvidia-cuda-toolkit
  4. sudo apt-get remove --auto-remove nvidia-cuda-toolkit
  5. sudo apt-get purge nvidia-cuda-toolkit
  6. sudo apt-get purge --auto-remove nvidia-cuda-toolkit
  7. sudo apt-get autoremove --purge cuda
  8. sudo apt-get --purge -y remove 'cuda*'
  9. sudo apt-get --purge -y remove 'nvidia*'
  10. sudo reboot
  11.  
  12.  
  13.  
  14. #!/bin/bash
  15.  
  16. # Purge existign CUDA first
  17. sudo apt --purge remove "cublas*" "cuda*"
  18. sudo apt --purge remove "nvidia*"
  19.  
  20. # Install CUDA Toolkit 10
  21. wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
  22. sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update
  23. sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
  24.  
  25. sudo apt update
  26. sudo apt install -y cuda
  27.  
  28. # Install CuDNN 7 and NCCL 2
  29. wget https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
  30. sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
  31.  
  32. sudo apt update
  33. sudo apt install -y libcudnn7 libcudnn7-dev libnccl2 libc-ares-dev
  34.  
  35. sudo apt autoremove
  36. sudo apt upgrade
  37.  
  38. # Link libraries to standard locations
  39. sudo mkdir -p /usr/local/cuda-10.1/nccl/lib
  40. sudo ln -s /usr/lib/x86_64-linux-gnu/libnccl.so.2 /usr/local/cuda/nccl/lib/
  41. sudo ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7 /usr/local/cuda-10.1/lib64/
  42.  
  43. echo 'If everything worked fine, reboot now.'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top