Closed lestephane closed 4 years ago
Do you know where it is installing the cuda libraries, libcuda.so
for example? That would be the first step in figuring out the right paths to add. You might be able to use pkg-config --libs cuda-whatever
.
Is this thing to install version 7.5 of the toolkit? While this should work, I will note that this version is extremely old.
Here is the location of libcuda.so
$ locate libcuda.so | xargs dpkg -S
libcuda1-384: /usr/lib/i386-linux-gnu/libcuda.so
libcuda1-384: /usr/lib/i386-linux-gnu/libcuda.so.1
libcuda1-384: /usr/lib/i386-linux-gnu/libcuda.so.384.130
libcuda1-384: /usr/lib/x86_64-linux-gnu/libcuda.so
libcuda1-384: /usr/lib/x86_64-linux-gnu/libcuda.so.1
libcuda1-384: /usr/lib/x86_64-linux-gnu/libcuda.so.384.130
And where that comes from
$ dpkg -l libcuda1-384
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================-=======================-=======================-===============================================================================
ii libcuda1-384 384.130-0ubuntu0.16.04. amd64 NVIDIA CUDA runtime library
$ apt-cache madison libcuda1-384
libcuda1-384 | 384.130-0ubuntu0.16.04.1 | http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
libcuda1-384 | 384.130-0ubuntu0.16.04.1 | http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial/main amd64 Packages
I'm just scared to use an installer outside of the apt machinery. The NVidia installer will modify all sorts of things, and I only have control over /etc through etckeeper
.
It is possible to get CUDA from NVIDIA via the apt system, but you do have to add it as an external repository source first: https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=debnetwork
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-ubuntu1604.pin
sudo mv cuda-ubuntu1604.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
I'm not sure if this would interfere with your bumblebee setup in any way. I don't mind supporting your setup (the package directly from Ubuntu, not NVIDIA) if I can; we just need to figure out the correct paths where everything is located.
I'll add the apt source you gave me, install cuda that way, and try the detection again. I'm more comfortable working with the apt package manager than bypassing through an installer.
I'm just going to say I think the problem might be with the library looking in lib64. Nixpkgs installs CUDA by downloading Nvidia's .run
file and installing it to a specific directory. Evidently, the lib64 directory is not there.
Found CUDA toolkit at:
/nix/store/zpy06m2mgd47zzwy4cr7d75ajx3p3614-cudatoolkit-10.1.243
setup: Could not find path:
["/nix/store/zpy06m2mgd47zzwy4cr7d75ajx3p3614-cudatoolkit-10.1.243/lib64"]
cabal: Failed to build cuda-0.10.1.0 (which is required by
accelerate-llvm-ptx-1.2.0.1). See the build log above for details.
The issue is partially documented here. https://github.com/NixOS/nixpkgs/issues/6562
I'm no longer working on fixing this issue on my side.
I'd like to avoid installing CUDA using Nvidia's installer if I can help it, as I have a carefully crafted, working, bumblebee setup which I don't want to mess up.
Alas, no luck with the stock
nvidia-cuda-toolkit
in ubuntu 16.04. Can someone who managed to make it work maybe give a workaround suggestion? While this issue looks similar to #54, I do not have any/usr/lib/cuda
directory, so I'm filing it as a separate issue in case it helps someone else.