Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ronaldokun/4be900c1b50a165cd14818e6916dfd2b to your computer and use it in GitHub Desktop.
Save ronaldokun/4be900c1b50a165cd14818e6916dfd2b to your computer and use it in GitHub Desktop.
#sudo dpkg --install cuda-repo-<distro>-<version>.<architecture>.deb
#sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/<distro>/<architecture>/7fa2af80.pub
$ sudo apt-get update
$ sudo apt-get install cuda
$ sudo apt-get install nvidia-cuda-toolkit
Reboot the system to load the NVIDIA drivers.
Set up the development environment by modifying the PATH and LD_LIBRARY_PATH variables:
$ export PATH="/usr/local/cuda-8.0/bin:$PATH"
$ export LD_LIBRARY_PATH="/usr/local/cuda-9.1/lib64:$LD_LIBRARY_PATH"
Fix Warning about missing libraries
$ sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglfw3-dev libgles2-mesa-dev
Install a writable copy of the samples then build and run the nbody sample:
$ cuda-install-samples-9.1.sh ~
$ cd ~/NVIDIA_CUDA-9.1_Samples/5_Simulations/nbody
$ GLPATH=/usr/lib make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment