shaital
November 12, 2024, 2:58pm
1
hi, why I am getting this error? how can I fix it? when logging with ssh what it the su password?
CUDA_HOME environment variable is not set. Please set it to your CUDA install root
1 Like
In the Zero GPU space, the CUDA Toolkit is actually not installed.
shaital
November 12, 2024, 4:30pm
3
Thanks, I did as said but strangly, still have the same error.
1 Like
opened 11:51AM - 04 Apr 24 UTC
The error info is as below:I've already set the CUDA_HOME and checked it on my c… ommand line,but when I run setup.py,it still tells my that"CUDA_HOME environment variable is not set. Please set it to your CUDA install root."I wonder why?????????
(dmodel) C:\Users\xgh\tiny-cuda-nn\bindings\torch>python setup.py install
C:\Users\xgh\tiny-cuda-nn\bindings\torch\setup.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import parse_version
Building PyTorch extension for tiny-cuda-nn version 1.7
Obtained compute capabilities [86] from environment variable TCNN_CUDA_ARCHITECTURES
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Fri_Dec_17_18:28:54_Pacific_Standard_Time_2021
Cuda compilation tools, release 11.6, V11.6.55
Build cuda_11.6.r11.6/compiler.30794723_0
Detected CUDA version 11.6
Targeting C++ standard 17
Traceback (most recent call last):
File "C:\Users\xgh\tiny-cuda-nn\bindings\torch\setup.py", line 187, in <module>
ext_modules = [make_extension(comp) for comp in compute_capabilities]
File "C:\Users\xgh\tiny-cuda-nn\bindings\torch\setup.py", line 187, in <listcomp>
ext_modules = [make_extension(comp) for comp in compute_capabilities]
File "C:\Users\xgh\tiny-cuda-nn\bindings\torch\setup.py", line 172, in make_extension
ext = CUDAExtension(
File "C:\Users\xgh\anaconda3\envs\dmodel\lib\site-packages\torch\utils\cpp_extension.py", line 1074, in CUDAExtension
library_dirs += library_paths(cuda=True)
File "C:\Users\xgh\anaconda3\envs\dmodel\lib\site-packages\torch\utils\cpp_extension.py", line 1208, in library_paths
paths.append(_join_cuda_home(lib_dir))
File "C:\Users\xgh\anaconda3\envs\dmodel\lib\site-packages\torch\utils\cpp_extension.py", line 2407, in _join_cuda_home
raise OSError('CUDA_HOME environment variable is not set. '
OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
(dmodel) C:\Users\xgh\tiny-cuda-nn\bindings\torch>echo %CUDA_HOME%
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6
It seems that this error also occurs when torch is not the CUDA version, but in the case of Zero GPU space, the CUDA version of torch should normally be installed automatically.
You may need to manually install the problem library (not torch) using subprocess.run(“pip foobar”, shell=True) after the workaround, rather than requirements.txt . I don’t know which library it is…