This is super exciting work and I just wanted to tinker around with it, but it seems the last step in the installation instruction is throwing an error.
If we can't fix the issue, I would also appreciate it if you could share the exact environment (os and linux kernel version) that you're using so I can see if the error still occurs there.
Operating System: Pop!_OS 22.04 LTS
Kernel: Linux 6.0.2-76060002-generic
Architecture: x86-64
(base) kuwajerw@pop-os [08:45:58PM 13/11/2022]:
(main) ~/repos/clip-fields/gridencoder/
$ which nvcc
/usr/bin/nvcc
(base) kuwajerw@pop-os [08:51:12PM 13/11/2022]:
(main) ~/repos/clip-fields/gridencoder/
$
(base) kuwajerw@pop-os [08:51:41PM 13/11/2022]:
(main) ~/repos/clip-fields/gridencoder/
$ locate nvcc | grep /nvcc$
/usr/bin/nvcc
/usr/lib/nvidia-cuda-toolkit/bin/nvcc
/usr/local/cuda-11.8/bin/nvcc
(base) kuwajerw@pop-os [08:51:47PM 13/11/2022]:
(main) ~/repos/clip-fields/gridencoder/
$
# each time I would run the `python setup.py install`, I would uncomment one of these lines in my bashrc and start a new terminal window
# export CUDA_HOME=/usr
# export CUDA_HOME=/usr/local/cuda-11.8/
# export CUDA_HOME=/usr/lib/nvidia-cuda-toolkit
(cf) kuwajerw@pop-os [08:54:53PM 13/11/2022]:
(main) ~/repos/clip-fields/gridencoder/
$ python setup.py install
/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/torch/cuda/__init__.py:52: 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 /opt/conda/conda-bld/pytorch_1627336325426/work/c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
No CUDA runtime is found, using CUDA_HOME='/usr/lib/nvidia-cuda-toolkit'
running install
/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing gridencoder.egg-info/PKG-INFO
writing dependency_links to gridencoder.egg-info/dependency_links.txt
writing top-level names to gridencoder.egg-info/top_level.txt
reading manifest file 'gridencoder.egg-info/SOURCES.txt'
writing manifest file 'gridencoder.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building '_gridencoder' extension
Traceback (most recent call last):
File "setup.py", line 44, in <module>
setup(
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/install.py", line 74, in run
self.do_egg_install()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/install.py", line 123, in do_egg_install
self.run_command('bdist_egg')
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 165, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 151, in call_command
self.run_command(cmdname)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 112, in build
self.run_command('build_ext')
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
self.distribution.run_command(command)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
_build_ext.run(self)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
self.build_extensions()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
build_ext.build_extensions(self)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
self._build_extensions_serial()
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
self.build_extension(ext)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
_build_ext.build_extension(self, ext)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 547, in build_extension
objects = self.compiler.compile(
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 524, in unix_wrap_ninja_compile
cuda_post_cflags = unix_cuda_flags(cuda_post_cflags)
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 423, in unix_cuda_flags
cflags + _get_cuda_arch_flags(cflags))
File "/home/kuwajerw/anaconda3/envs/cf/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1561, in _get_cuda_arch_flags
arch_list[-1] += '+PTX'
IndexError: list index out of range
(cf) kuwajerw@pop-os [08:54:59PM 13/11/2022]:
(main) ~/repos/clip-fields/gridencoder/
$
So I'm not sure what I'm doing wrong exactly? Are you using ubuntu 22.04? Anything you can suggest I try?