graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
14.38k stars 1.87k forks source link

CUDA version #197

Closed nofreewill42 closed 1 year ago

nofreewill42 commented 1 year ago

In the README: CUDA SDK 11 for PyTorch extensions, install after Visual Studio (we used 11.8, known issues with 11.6) But in the environment.yml, there is the dependency for cudatoolkit=11.6 ?

conda list gives me cudatoolkit 11.6.2 hfc3e2af_12 conda-forge

Does this have any to do with the following error?

(gaussian_splatting) nofreewill@nofreewill:~/Documents/Learn/gaussian-splatting$ python convert.py -s data/adas/

ERROR: Cannot use Sift GPU without CUDA or OpenGL support; set SiftExtraction.use_gpu or SiftMatching.use_gpu to false.
ERROR:root:Feature extraction failed with code 256. Exiting.

But if I modify the yaml file to have cudatoolkit=11.8 instead, this happens when I try to install again after conda env remove --name gaussian_splatting

(base) nofreewill@nofreewill:~/Documents/Learn/gaussian-splatting$ conda env create --file environment.yml

Collecting package metadata (repodata.json): | WARNING conda.models.version:get_matcher(548): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.9.0.*, but conda is ignoring the .* and treating it as 1.9.0
WARNING conda.models.version:get_matcher(548): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.8.0.*, but conda is ignoring the .* and treating it as 1.8.0
WARNING conda.models.version:get_matcher(548): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.7.1.*, but conda is ignoring the .* and treating it as 1.7.1
WARNING conda.models.version:get_matcher(548): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.6.0.*, but conda is ignoring the .* and treating it as 1.6.0
done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 23.5.2
  latest version: 23.7.4

Please update conda by running

    $ conda update -n base -c defaults conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.7.4

Downloading and Extracting Packages

Preparing transaction: done                                                                                                                                                       
Verifying transaction: done                                                                                                                                                       
Executing transaction: / By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html                                                                                                                                                  

done
Installing pip dependencies: | Ran pip subprocess with arguments:
['/home/nofreewill/miniconda3/envs/gaussian_splatting/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/nofreewill/Documents/Learn/gaussian-splatting/condaenv.uofhwrk2.requirements.txt', '--exists-action=b']
Pip subprocess output:
Processing ./submodules/diff-gaussian-rasterization
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Processing ./submodules/simple-knn
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: diff-gaussian-rasterization, simple-knn
  Building wheel for diff-gaussian-rasterization (setup.py): started
  Building wheel for diff-gaussian-rasterization (setup.py): finished with status 'error'
  Running setup.py clean for diff-gaussian-rasterization
  Building wheel for simple-knn (setup.py): started
  Building wheel for simple-knn (setup.py): finished with status 'error'
  Running setup.py clean for simple-knn
Failed to build diff-gaussian-rasterization simple-knn
Installing collected packages: simple-knn, diff-gaussian-rasterization
  Running setup.py install for simple-knn: started
  Running setup.py install for simple-knn: finished with status 'error'

Pip subprocess error:
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [51 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.8'
      running bdist_wheel
      running build
      running build_py
      running build_ext
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/nofreewill/Documents/Learn/gaussian-splatting/submodules/diff-gaussian-rasterization/setup.py", line 32, in <module>
          'build_ext': BuildExtension
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 434, in build_extensions
          self._check_cuda_version(compiler_name, compiler_version)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 808, in _check_cuda_version
          torch_cuda_version = packaging.version.parse(torch.version.cuda)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 52, in parse
          return Version(version)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 196, in __init__
          match = self._regex.search(version)
      TypeError: expected string or bytes-like object
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for diff-gaussian-rasterization
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.8'
      running bdist_wheel
      running build
      running build_ext
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/nofreewill/Documents/Learn/gaussian-splatting/submodules/simple-knn/setup.py", line 33, in <module>
          'build_ext': BuildExtension
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 434, in build_extensions
          self._check_cuda_version(compiler_name, compiler_version)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 808, in _check_cuda_version
          torch_cuda_version = packaging.version.parse(torch.version.cuda)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 52, in parse
          return Version(version)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 196, in __init__
          match = self._regex.search(version)
      TypeError: expected string or bytes-like object
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for simple-knn
  error: subprocess-exited-with-error

  × Running setup.py install for simple-knn did not run successfully.
  │ exit code: 1
  ╰─> [65 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.8'
      running install
      /home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!

              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.

              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************

      !!
        self.initialize_options()
      running build
      running build_ext
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/nofreewill/Documents/Learn/gaussian-splatting/submodules/simple-knn/setup.py", line 33, in <module>
          'build_ext': BuildExtension
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/install.py", line 78, in run
          return orig.install.run(self)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/install.py", line 697, in run
          self.run_command('build')
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 434, in build_extensions
          self._check_cuda_version(compiler_name, compiler_version)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 808, in _check_cuda_version
          torch_cuda_version = packaging.version.parse(torch.version.cuda)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 52, in parse
          return Version(version)
        File "/home/nofreewill/miniconda3/envs/gaussian_splatting/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/version.py", line 196, in __init__
          match = self._regex.search(version)
      TypeError: expected string or bytes-like object
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> simple-knn

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

failed

CondaEnvException: Pip failed

It says something like this:

Running setup.py clean for diff-gaussian-rasterization
  Building wheel for simple-knn (setup.py): started
  Building wheel for simple-knn (setup.py): finished with status 'error'
  Running setup.py clean for simple-knn
Failed to build diff-gaussian-rasterization simple-knn
Installing collected packages: simple-knn, diff-gaussian-rasterization
  Running setup.py install for simple-knn: started
  Running setup.py install for simple-knn: finished with status 'error'

Pip subprocess error:
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [51 lines of output]
      No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.8'

But the CUDA_HOME directory looks okay:

(gaussian_splatting) nofreewill@nofreewill:~/Documents/Learn/gaussian-splatting$ ls /usr/local/cuda-11.8

bin                DOCS      extras  gds-11.8  lib64    nsight-compute-2022.3.0  nsight-systems-2022.4.2  nvvm    share  targets  version.json
compute-sanitizer  EULA.txt  gds     include   libnvvp  nsightee_plugins         nvml                     README  src    tools

What am I missing? :/

dialectrics commented 1 year ago

https://github.com/graphdeco-inria/gaussian-splatting/issues/150

See here for answer. I ran into the exact same thing it's just a confusing misnomer.