On Ubuntu 20.04, you can simply install NVIDIAs cuda toolkit cuda
:
sudo apt-get update
sudo apt install nvidia-cuda-toolkit
There are also install advices for Windows.
The packge is around 1GB and it took a while to install… Some minutes later you need to export PATH
variables so that it can be found:
- Find Shared Object
sudo find / -name 'libcudart.so*'
/usr/lib/x86_64-linux-gnu/libcudart.so.10.1
/usr/lib/x86_64-linux-gnu/libcudart.so
- Add the folder to
path
, so that python finds it
export PATH=/usr/lib/x86_64-linux-gnu${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- Permissions
sudo chmod a+r /usr/lib/x86_64-linux-gnu/libcuda*
Helped me