Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinny-cuda wont install. CUDA not found #1206

Closed
Sinicyn78 opened this issue Jan 5, 2023 · 10 comments
Closed

tinny-cuda wont install. CUDA not found #1206

Sinicyn78 opened this issue Jan 5, 2023 · 10 comments

Comments

@Sinicyn78
Copy link

(nerfstudio) root@home:/home/sinicyn/Downloads# pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
Cloning https://github.com/NVlabs/tiny-cuda-nn/ to /tmp/pip-req-build-b8w1_isc
Running command git clone --filter=blob:none --quiet https://github.com/NVlabs/tiny-cuda-nn/ /tmp/pip-req-build-b8w1_isc
Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit 14053e9a87ebf449d32bda335c0363dd4f5667a4
Running command git submodule update --init --recursive -q
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
/root/anaconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/cuda/init.py:83: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 803: system has unsupported display driver / cuda driver combination (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-req-build-b8w1_isc/bindings/torch/setup.py", line 30, in
raise EnvironmentError("Unknown compute capability. Specify the target compute capabilities in the TCNN_CUDA_ARCHITECTURES environment variable or install PyTorch with the CUDA backend to detect it automatically.")
OSError: Unknown compute capability. Specify the target compute capabilities in the TCNN_CUDA_ARCHITECTURES environment variable or install PyTorch with the CUDA backend to detect it automatically.
No CUDA runtime is found, using CUDA_HOME='/usr'
Building PyTorch extension for tiny-cuda-nn version 1.7
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@THE-COB
Copy link
Contributor

THE-COB commented Jan 6, 2023

Where did you install CUDA_HOME and CUDA_PATH?

@Sinicyn78
Copy link
Author

I'm trying to install in windows via conda
Installed CUDA 11.3
now these errors

image

@THE-COB
Copy link
Contributor

THE-COB commented Jan 6, 2023

I'm trying to install in windows via conda
Installed CUDA 11.3
now these errors

image

Can I see a screenshot of your system and user environment variables

@Sinicyn78
Copy link
Author

I'm trying to install in windows via conda
Installed CUDA 11.3
now these errors
image

Can I see a screenshot of your system and user environment variables

image

image

image

image

@THE-COB
Copy link
Contributor

THE-COB commented Jan 8, 2023

Try making a CUDA_HOME env variable with the same value as CUDA_PATH in both system and user variables (this way you can do it on both admin and user accounts)

@Sinicyn78
Copy link
Author

Try making a CUDA_HOME env variable with the same value as CUDA_PATH in both system and user variables (this way you can do it on both admin and user accounts)

now these errors:
image
image
image

@THE-COB
Copy link
Contributor

THE-COB commented Jan 18, 2023

Try installing ninja like in this issue NVlabs/tiny-cuda-nn#169 (comment)

@dooonnis
Copy link

dooonnis commented Feb 6, 2023

I also ran into this problem and tried many solutions. I found the solution here #1177 and installed tiny-cuda-nn thanks to this comment.

To document what I have done to get nerfstudio via conda to work properly:

  1. Installed CUDA 11.7 and VS 2019 and deinstalled all other versions

  2. Created a conda envoriment
    conda create --name nerfstudio -y python=3.8
    conda activate nerfstudio
    python -m pip install --upgrade pip

  3. Installed pytorch
    pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html

  4. Git cloned tiny-cuda-nn via the repo into miniconda3\envs\nerfstudio\Lib\site-packages
    git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
    cd tiny-cuda-nn
    cmake . -B build
    cmake --build build --config RelWithDebInfo -j
    (cmake commands run in VS developer command prompt)

  5. Installed nerfstudio
    pip install nerfstudio

  6. Reinstalled tiny-cuda-nn via pip
    pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

How tiny-cuda-nn was installed may not makes sense, but that's what worked in the end. Nerfstudio is now fully functional.

@tancik
Copy link
Contributor

tancik commented Feb 22, 2023

Closing, feel free to reopen if it is still and issue.

@tancik tancik closed this as completed Feb 22, 2023
@Xerthor
Copy link

Xerthor commented Apr 21, 2023

This one worked for me but I had to install CUDA 12.1.1 before runing cmake . -B build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants