I just setup my Ubuntu 16.04 workstation with an Nvidia GTX 1070, having successfully installed the latest driver through the graphics-drivers PPA following the instructions here.
The nvidia-367 driver made it possible for my GPU to work correctly on my system, correcting the resolution when previously it was totally off when it was still running Nouveau.
I'm not using my machine for gaming, but for data science, so I needed the CUDA toolkit chain (the suite of tools covering NVCC, the CUDA accelerated libraries, and so forth), so I proceeded to install them using the single command of
sudo apt-get install nvidia-cuda-toolkit. The whole installation proceeded well, but at the end, I realized I was missing one thing: CUDA code samples!
Even after searching high and low, I have not been able to figure out a way to carry out a standalone installation of the CUDA code samples into my system. From what I understand of the Nvidia documentation , these samples would get automatically installed when I install the CUDA toolkit through a .deb or .run file downloaded from the Nvidia CUDA downloads webpage.
So my questions are:
Is there any way that I could obtain the source files for the Nvidia CUDA samples? Just the raw source files, together with the correct Makefile, so that I can compile these samples and run them without going through the whole Nvidia CUDA toolkit installer?
Otherwise, has anyone had experience using the Nvidia installer, and if so, does anyone know whether I can skip the CUDA toolkit installation (since I've already done that through apt-get) and just use the installer to download the CUDA samples?
And my follow up question to this is:
- Am I doing something wrong by not installing CUDA toolkit using Nvidia installer? What's the difference between using that and apt-get? For one, I kind of noticed that there seems to be a difference in the locations of where the CUDA binaries get installed. Using apt-get, tools like NVCC and NVProf have their binaries sitting in my /usr/bin folder (they can also be found in /usr/lib/nvidia-cuda-toolkit/bin; my guess is that they were first compiled and stored under /usr/lib/nvidia-cuda-toolkit/bin but the later copied to /usr/bin). But it seems like using the Nvidia installer, they would end up somewhere else, as the documentation advises modifications to be made to one's $PATH environment variable.
I would greatly appreciate even a partial answer to any one of the few questions that I have posted here, or alternative suggestions to the way I am thinking about this. Thank you!