SHOW:
|
|
- or go back to the newest paste.
| 1 | 1) Install Ubuntu 12.04.3 64-bit | |
| 2 | ||
| 3 | 2) Update | |
| 4 | open terminal: | |
| 5 | sudo apt-get update && sudo apt-get upgrade | |
| 6 | sudo shutdown -r now # reboot machine | |
| 7 | ||
| 8 | 3) install compilation tools, mpi, nvidia-331 driver, gcc/g++ 4.6 | |
| 9 | (supported, as opposed to gcc/g++ 4.8 or 4.7.3) and set as default. | |
| 10 | Also, install other libraries needed for CUDA Toolkit Samples compilation and make the | |
| 11 | respective symbolic links to where the CUDA Toolkit installer will find them: | |
| 12 | ||
| 13 | sudo add-apt-repository ppa:xorg-edgers/ppa # adds repository that has latest NVIDIA drivers for 12.04.3 | |
| 14 | sudo apt-get update # updates package lists | |
| 15 | sudo apt-get install build-essential libcr-dev mpich2 mpich2-doc gcc-4.6 g++-4.6 nvidia-331 # build tools, compilers, gcc, nvidia | |
| 16 | sudo apt-get install libX11-dev libglu1-mesa libXi-dev libXmu-dev freeglut3-dev # libraries needed for compiling CUDA samples | |
| 17 | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 | |
| 18 | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 | |
| 19 | sudo ln -s /usr/lib/x86_64-linux-gnu/libXi.so /usr/lib/libXi.so | |
| 20 | sudo ln -s /usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/libGLU.so | |
| 21 | sudo ln -s /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/libX11.so | |
| 22 | sudo ln -s /usr/lib/x86_64-linux-gnu/libXmu.so /usr/lib/libXmu.so | |
| 23 | sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so /usr/lib/libglut.so | |
| 24 | sudo shutdown -r now # reboot machine | |
| 25 | ||
| 26 | 4) download & install CUDA 5.5 Toolkit 64-bit for Ubuntu 12.10 (RUN): | |
| 27 | download here: https://developer.nvidia.com/cuda-downloads | |
| 28 | ||
| 29 | install -- open terminal in directory where downloaded: | |
| 30 | ||
| 31 | chmod +x cuda_5.5.22_linux_64.run # This marks archive as an executable, archive name might be different | |
| 32 | sudo ./cuda_5.5.22_linux_64.run | |
| 33 | ||
| 34 | # step through license agreement, then type: accept | |
| 35 | Confirm you are installing on unsupported configuration -- type: y | |
| 36 | Installer will ask to install NVIDIA driver -- type: n | |
| 37 | Installer will ask to install the CUDA 5.5 Toolkit -- type: y | |
| 38 | Installer will ask toolkit location -- default is okay, hit Enter key to select default | |
| 39 | Installer will ask to install CUDA 5.5 Samples -- type: y | |
| 40 | Installer will ask samples location -- this can be changed, or left to default, I chose /opt/cuda_samples and later chown'ed that directory so that all could read/write to it | |
| 41 | ||
| 42 | Installer should complete, saying: | |
| 43 | ||
| 44 | =========== | |
| 45 | = Summary = | |
| 46 | =========== | |
| 47 | ||
| 48 | Driver: Not Selected | |
| 49 | Toolkit: Installed in /usr/local/cuda-5.5 | |
| 50 | Samples: Installed in /opt/cuda_samples | |
| 51 | ||
| 52 | Next: | |
| 53 | ||
| 54 | gedit ~/.bashrc & | |
| 55 | ||
| 56 | and place the following lines in the file: | |
| 57 | ||
| 58 | export PATH=/usr/local/cuda/bin:$PATH | |
| 59 | - | export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib:/usr/lib/nvidia-319:$LD_LIBRARY_PATH |
| 59 | + | export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/lib:/usr/lib/nvidia-331:$LD_LIBRARY_PATH |
| 60 | ||
| 61 | Also add a variable in .bashrc called CUDA_SAMPLES pointing to the directory where the CUDA samples were installed from above... i.e.: | |
| 62 | ||
| 63 | export CUDA_SAMPLES=/home/username/NVIDIA_CUDA-5.5_Samples | |
| 64 | ||
| 65 | Lastly, to compile all the CUDA Toolkit sources: | |
| 66 | ||
| 67 | # needed to compile samples that depend on GL | |
| 68 | cp /usr/local/cuda-5.5/extras/CUPTI/include/GL/glu.h ${CUDA_SAMPLES}/common/inc/GL/
| |
| 69 | cp /usr/local/cuda-5.5/extras/CUPTI/include/GL/gl.h ${CUDA_SAMPLES}/common/inc/GL/
| |
| 70 | ||
| 71 | - | Finally, from a terminal in the directory that was chosed to install the samples type: make |
| 71 | + | One other thing, need to make a link to /usr/lib/nvidia-current to the driver files installed |
| 72 | by the nvidia-331 driver, as this is the location where CUDA looks for libraries in Ubuntu. Do this via: | |
| 73 | ||
| 74 | - | For platforms with Optimus (laptops) refer to: http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html |
| 74 | + | sudo ln -s /usr/lib/nvidia-331 /usr/lib/nvidia-current |
| 75 | ||
| 76 | Finally, from a terminal in the directory that was chosen to install the samples type: make | |
| 77 | All the samples should compile successfully. | |
| 78 | ||
| 79 | For platforms with Optimus (laptops) refer to: http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html or look at http://bumblebee-project.org/ |