The right way to have cuda in all requisite paths

I used to have Debian 12 nvidia-cuda-toolkit installed. With that, nvcc just worked and gcc with
include <cuda.h>
and -lcudart and -lcublas just worked.

I now have cuda-toolkit-12-8 installed instead. I have to put /usr/local/cuda-12.8/bin
in my PATH to access nvcc. And I have to specify -I/usr/local/cuda-12.8/targets/x86_64-linux/include
and -L/usr/local/cuda-12.8/targets/x86_64-linux/lib to gcc.

What is the right way to make all these magic paths (and everything else I haven’t run into yet) be the default?

Thanks,
Jeff (http: //engineering.purdue.edu/~qobi)

Install Guide.

The right way is to use containers

I think this is intentional as you may have several versions of cuda installed alongside each other. Also it’s probably better to install cuda-12.8 metapackage than cuda-toolkit-12-8 directly.

Thanks. I installed cuda-toolkit-12-8 because the docs said that cuda-12-8 installs the driver and I didn’t want to risk installing nvidia-open because I have a Pascal GPU. But I noticed that when I accidentally installed cuda-12-3 instead of cuda-toolkit-12.-3 that it didn’t install the driver. So I will go back and install cuda-12-8.

1 Like