Score:0

No /usr/local/cuda/ directory after Cuda installation

gb flag

I have installed Cuda with this command:

$ sudo apt install nvidia-cuda-toolkit gcc-10

and then checked the version with:

    $ nvcc --version
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2021 NVIDIA Corporation
    Built on Sun_Feb_14_21:12:58_PST_2021
    Cuda compliation tools, release 11.2, V11.2.152
    Build cuda_11.2.r11.2/compiler.29618528_0

However, there is no /usr/local/cuda/ directory and so I do not know what to do as I think having this directory is necessary to install cuDNN (which is the end goal).

I am using lubuntu 21.04 and an NVIDIA GeForce GT 720M GPU with a legacy 390 driver.

So if you could tell me what to do in order to install Cuda correctly so that there is a /usr/local/cuda/ directory and I can install cuDNN, that would be great!

Edit: After installing cudnn by copying the files from the tar file into /usr/lib/cuda/ (thanks to Tilman) I tried to verify the installation by trying to compile the mnistCUDNN file in the /usr/src/cudnn_samples_v8 directory (as suggested in the Nvidia docs) but that directory also doesn't exist. Any idea on where it would be?

Thank you.

Tilman avatar
cn flag
`apt` packages do not usually install their stuff under `/usr/local`. You can see where the `nvidia-cuda-toolkit` package did install its stuff with the command `dpkg -L nvidia-cuda-toolkit`. What makes you think you need a `/usr/local/cuda` directory?
Adam avatar
gb flag
@Tilman thanks it seems to be installed in /usr/lib/cuda/. The Nvidia tutorial https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux suggests that /usr/local/cuda/ is the cuda toolkit directory but I assume that I can just replace that with /usr/lib/cuda/?
cc flag
You're tangled up in some old Nvidia instructions (CUDA 8), where the assumed installation is all under one directory, with a bin, lib64, and include. Later CUDA releases (and the Ubuntu installs) have a new way, they sprinkle the CUDA bins, libs, and included into the existing system areas (so no modifications needed to PATH or LD_LIBRARY_PATH). Put your dnn files into those system areas (along with the cuda files already there).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.