#! /bin/bash # Install nvidia cuda driver for Centos 6 machine a Nvidia GeForce GTX 560 Ti GPU by using a local run file # Follow the instructions as provided in # http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#abstract # Two installation methods are available. I choosed the one using Runfile Installation instead of the Package Manager Installation # In the case of Rocks 6.1.1, CentOS 6.5, I am installing CUDA GPU in a local node. I need to yum instal the following before NVDIA-cuda can work properly yum install -y gcc-c++.x86_64 yum install -y freeglut.x86_64 #first, check that the nvidia gpu is seen by the system #lspci | grep -i nvidia #If see nothing, update-pciids lspci | grep -i nvidia ## Check if see if nouveau is on. lsmod | grep nouveau ## if something is printed that means nouveau is on. We need to disable it. #Disabling Nouveau: echo blacklist nouveau > /etc/modprobe.d/blacklist-nouveau.conf echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nouveau.conf dracut --force #init 3 echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc echo 'export CUDA_HOME=/usr/local/cuda' >> ~/.bashrc ## Check if see if nouveau is still on. # lsmod | grep nouveau ## if something is printed that means nouveau is still on. In this case, need to reboot. reboot now