ashawkey / torch-ngp

A pytorch CUDA extension implementation of instant-ngp (sdf and nerf), with a GUI.
MIT License
2.11k stars 275 forks source link

About environments! #186

Closed XLR-man closed 1 year ago

XLR-man commented 1 year ago

I have many problems about install the env:

Installing pip dependencies: | Ran pip subprocess with arguments:                                                                                                                                                                        
['/data/xielangren/miniconda3/envs/torch-ngp/bin/python', '-m', 'pip', 'install', '-U', '-r', '/data/xielangren/project/torch-ngp/condaenv.ksuxyuvb.requirements.txt', '--exists-action=b']
Pip subprocess output:
Collecting git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch (from -r /data/xielangren/project/torch-ngp/condaenv.ksuxyuvb.requirements.txt (line 7))
  Cloning https://github.com/NVlabs/tiny-cuda-nn/ to /tmp/pip-req-build-s62n_udk
  Resolved https://github.com/NVlabs/tiny-cuda-nn/ to commit 212104156403bd87616c1a4f73a1c5f2c2e172a9
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): still running...
  Preparing metadata (setup.py): finished with status 'error'

Pip subprocess error:
  Running command git clone --filter=blob:none --quiet https://github.com/NVlabs/tiny-cuda-nn/ /tmp/pip-req-build-s62n_udk
  Running command git submodule update --init --recursive -q
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      /tmp/pip-req-build-s62n_udk/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
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-s62n_udk/bindings/torch/setup.py", line 51, in <module>
          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.
      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.

failed

CondaEnvException: Pip failed

What is the problem and how can I solve it?

XLR-man commented 1 year ago

I follow the readme,after pip install -r requirements.txt, i got:

Package                  Version
------------------------ ------------
boltons                  23.0.0
brotlipy                 0.7.0
cachetools               5.3.1
certifi                  2023.5.7
cffi                     1.15.1
charset-normalizer       2.0.4
conda                    23.5.2
conda-content-trust      0.1.3
conda-libmamba-solver    23.5.0
conda-package-handling   2.1.0
conda_package_streaming  0.8.0
contourpy                1.1.1
cryptography             39.0.1
cutlass                  0.0.1
cycler                   0.12.1
dearpygui                1.10.1
filelock                 3.13.1
fmt                      0.3.1
fonttools                4.44.0
fsspec                   2023.10.0
idna                     3.4
imageio                  2.31.6
Jinja2                   3.1.2
jsonpatch                1.32
jsonpointer              2.1
kiwisolver               1.4.5
libmambapy               1.4.1
lightning-utilities      0.9.0
lpips                    0.1.4
markdown-it-py           3.0.0
MarkupSafe               2.1.3
matplotlib               3.8.1
mdurl                    0.1.2
mpmath                   1.3.0
networkx                 3.2.1
ninja                    1.11.1.1
numpy                    1.26.1
nvidia-cublas-cu12       12.1.3.1
nvidia-cuda-cupti-cu12   12.1.105
nvidia-cuda-nvrtc-cu12   12.1.105
nvidia-cuda-runtime-cu12 12.1.105
nvidia-cudnn-cu12        8.9.2.26
nvidia-cufft-cu12        11.0.2.54
nvidia-curand-cu12       10.3.2.106
nvidia-cusolver-cu12     11.4.5.107
nvidia-cusparse-cu12     12.1.0.106
nvidia-ml-py             12.535.108
nvidia-nccl-cu12         2.18.1
nvidia-nvjitlink-cu12    12.3.52
nvidia-nvtx-cu12         12.1.105
nvitop                   1.3.0
opencv-python            4.8.1.78
packaging                23.0
pandas                   2.1.2
Pillow                   10.0.1
pip                      23.1.2
pluggy                   1.0.0
protobuf                 4.25.0
psutil                   5.9.5
pycosat                  0.6.4
pycparser                2.21
Pygments                 2.16.1
PyMCubes                 0.1.4
pyOpenSSL                23.0.0
pyparsing                3.1.1
pysdf                    0.1.9
PySocks                  1.7.1
python-dateutil          2.8.2
pytz                     2023.3.post1
requests                 2.29.0
rich                     13.6.0
ruamel.yaml              0.17.21
scipy                    1.11.3
setuptools               67.8.0
six                      1.16.0
sympy                    1.12
tensorboardX             2.6.2.2
termcolor                2.3.0
toolz                    0.12.0
torch                    2.1.0
torch-ema                0.3
torchmetrics             1.2.0
torchvision              0.16.0
tqdm                     4.65.0
trimesh                  4.0.2
triton                   2.1.0
typing_extensions        4.8.0
tzdata                   2023.3
urllib3                  1.26.16
wheel                    0.38.4
zstandard                0.19.0

when i run conda create env, i got the problem above