====== Install Nvidia graphic driver and CUDA ====== * [[https://linuxconfig.org/how-to-disable-nouveau-nvidia-driver-on-ubuntu-18-04-bionic-beaver-linux | How to disable nouveau driver]] * Install kernel source in Debian 8 ([[http://www.tuicool.com/articles/yiU77v | Ref]]) # install kernel source cd build mkdir kernel cd kernal sudo apt-get install dpkg-dev uname -r #the output should be included in $(uname -r) need to change the source of mirror into Tsinghua vi /etc/apt/source.list change deb-src into ??? #please remember to comment out security otherwise error would be reported. #and then update apt-get update apt-get source linux-image-$(uname -r) # finally copy source to system folder mv linux-xxx /usr/src # install kernel header sudo apt-get install linux-headers-$(uname -r) * Install graphic driver * 20190819-log: this step has been incorporated in the installation of cuda #download this one to the uda folder,then install it. * [[https://www.nvidia.com/en-us/drivers/unix/linux-amd64-display-archive | older version]] sudo ./NVIDIA-Linux-x86_64-375.20.run #accept license #install binaries #always continue/yes #pls noticed that this is step no longer need because we need latest CUDA which included latest NVIDIA already! * Install cuda # create some soft links otherwise cuda installation # will throw out warning message: # Missing recommended library: libGLU.so # Missing recommended library: libXi.so # Missing recommended library: libXmu.so # # ref: http://kmdouglass.github.io/stories/notes/cuda.html # # the following commands are likely not necessary! #sudo apt-get install libglu1-mesa-dev #sudo apt-get install libxi-dev #sudo apt-get install libxmu-dev cd /usr/lib sudo ln -s x86_64-linux-gnu/libGLU.so.1.3.1 libGLU.so sudo ln -s x86_64-linux-gnu/libXi.so.6.1.0 libXi.so sudo ln -s x86_64-linux-gnu/libXmu.so.6.2.0 libXmu.so # install cuda # During installation, choose to skip driver installation (we did it as shown above) sudo ./cuda_8.0.44_linux.run *#accept previously read EULA *install on an unsupported configuration:yes *#install NVIDIA *#install OpenGL *#run NVidia-xconfig *#install CUDA 8.0|9.2 Toolkit *#enter toolkit location:/usr/local/cuda *#install a symbolic link *#install cuda toolkit *#toolkit location /usr/local/cuda-8.0 *#install CUDA 8.0 samples *#CUDA sample Location it turns out that cd /home/panying/NVIDIA_CUDA-8.0_samples/ cd 1_Utilities/deviceQuery make mv /home/panying/NVIDIA_CUDA-8.0_samples/ /home/usr/share/ cd NVIDIA_CUDA-8.0_samples/1_Utilities/deviceQuery ./deviceQuery #pls check carefully and make sure that everything goes well with your GPU devices. ====== Troubleshooting ====== * error: token ""__CUDACC_VER__ is no longer supported. SOLUTION: comment out relevant line in /usr/local/cuda/include/crt/common_functions.h. [[https://github.com/BVLC/caffe/issues/5994 | Ref]] * math_functions.hpp not found when using CUDA with Eigen [[https://stackoverflow.com/questions/43113508/math-functions-hpp-not-found-when-using-cuda-with-eigen | Ref]] [[https://stackoverflow.com/questions/43113508/math-functions-hpp-not-found-when-using-cuda-with-eigen | aother possible solution]] * 20181228-panying,fix this bug in both orange and blue ========log======== * 20190820-log-install on ubuntu server 16.0 Xubuntu:https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04