'CUDA_HOME path for Tensorflow
The Tensorflow linux installation instructions say:
Ensure that you create the CUDA_HOME environment variable as described in the NVIDIA documentation.
I cannot find any mention of CUDA_HOME in the NVIDIA instructions for cuDNN v6 or in the NVIDIA CUDA Toolkit install instructions. Does anyone know how this variable should be set on linux?
Solution 1:[1]
Run the following command in the terminal:
export CUDA_HOME=/usr/local/cuda-X.X
Where you replace X.X by the first two digits of your version number (can be found out e.g. via nvcc --version).
Solution 2:[2]
Just had this issue whilst trying to install NVIDIAs Kaolin. As @user2023370 said the nvidia-cuda-toolkit creates a bunch of folders and I can confirm that it will set CUDA_HOME. This circumvents the need to set the variable with export CUDA_HOME=/usr/local/cuda-X.X
tldr; install nvidia-cuda-toolkit to set CUDA_HOME
Solution 3:[3]
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
or for the latest version of cuda put export PATH=/usr/local/cuda-11.6/bin${PATH:+:${PATH}} at the end of your bashrc.
It should work
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Martin Thoma |
| Solution 2 | qwertyuiop |
| Solution 3 | NatiCog |
