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

Last step of installation throws errors #3

Closed
alik-git opened this issue Nov 14, 2022 · 5 comments
Closed

Last step of installation throws errors #3

alik-git opened this issue Nov 14, 2022 · 5 comments

Comments

@alik-git
Copy link

alik-git commented Nov 14, 2022

Hi there,

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.

My environment info:

Operating System: Pop!_OS 22.04 LTS               
          Kernel: Linux 6.0.2-76060002-generic
    Architecture: x86-64

So everything upto the last section of installing gridencoder works perfectly.

The error is thrown in the last step when running python setup.py install, but before that, the instructions say to locate your nvcc path and set that as an environment variable, which I did. On my machine when I run which nvcc I get

(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/
$

However when I run locate nvcc | grep /nvcc$ I get a few more options:

(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/
$ 

I tried setting my CUDA_HOME environment variable to all three paths, one at a time, and ran the python setup.py install

# 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

But each time I always get the same error:

(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?

Additionally if I ignore this error and just try to run the demo notebook clip-fields/demo/1 - parse rgbd.ipynb I am stuck because I don't have an RGB-D video myself, or an iPhone 13. Would it be possible for you to supply a demo file, or a link to one? Thank you.

@notmahi
Copy link
Owner

notmahi commented Nov 14, 2022

Hi, thanks for trying out CLIP-Fields!

I am using Ubuntu 20.04. The error looks like it is coming from trying to compile the grid_encoder, which is taken from the Torch NGP repo. I am not an expert in it, and I think you may get more help and knowledgable responses if you raise this issue there.

Edit: Googling the problem seems like there's a potential fix here, have you tried this already? pytorch/extension-cpp#71

@notmahi notmahi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2022
@notmahi
Copy link
Owner

notmahi commented Nov 14, 2022

Also, I am sorry, but I did not see the second part of your question.

Additionally if I ignore this error and just try to run the demo notebook clip-fields/demo/1 - parse rgbd.ipynb I am stuck because I don't have an RGB-D video myself, or an iPhone 13. Would it be possible for you to supply a demo file, or a link to one? Thank you.

You can find some sample data hosted at OSF at the data link on the readme, right here.

@alik-git
Copy link
Author

alik-git commented Dec 1, 2022

Ah yes, thank you, the link you mentioned allowed me to fix my issue, and yes thank you for linking the sample data as well! Cheers!

@notmahi notmahi closed this as completed Dec 5, 2022
@alik-git
Copy link
Author

Hi there, another quick question. I keep getting out of memory errors when I try to run the demo notebooks.

Could you please give me an estimate of the kind of hardware necessary to run the demo scripts? What are you using? Mainly I would like to know how much RAM to create the dataset, and how much GPU memory to run inference.

Thank you.

@notmahi
Copy link
Owner

notmahi commented Jan 2, 2023

I would like to know how much RAM to create the dataset, and how much GPU memory to run inference.

I have run the code on machine with a 10 GB GPU memory (Nvidia 3080) and 64 GB RAM, but I have not run proper benchmarking so I cannot tell you if that is the minimum requirement for inference.

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

2 participants