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

ImportError Problem with Tinycudann bindings #26

Open
NoctemNana opened this issue Apr 28, 2024 · 6 comments
Open

ImportError Problem with Tinycudann bindings #26

NoctemNana opened this issue Apr 28, 2024 · 6 comments

Comments

@NoctemNana
Copy link

NoctemNana commented Apr 28, 2024

Process

…./MVDream-threestudio/docker$ docker compose build

…../MVDream-threestudio/docker$ docker compose up

…/MVDream-threestudio/docker$ docker compose exec threestudio bash

dreamer@...../threestudio$ python launch.py --config configs/mvdream-sd21.yaml --train --gpu 0 system.prompt_processor.prompt="an astronaut riding a horse"

Error message after prompt input

Traceback (most recent call last):
File "/home/dreamer/threestudio/launch.py", line 237, in
main(args, extras)
File "/home/dreamer/threestudio/launch.py", line 73, in main
import threestudio
File "/home/dreamer/threestudio/threestudio/init.py", line 36, in
from . import data, models, systems
File "/home/dreamer/threestudio/threestudio/data/init.py", line 1, in
from . import co3d, image, multiview, uncond, random_multiview
File "/home/dreamer/threestudio/threestudio/data/co3d.py", line 17, in
from threestudio.data.uncond import (
File "/home/dreamer/threestudio/threestudio/data/uncond.py", line 13, in
from threestudio.utils.base import Updateable
File "/home/dreamer/threestudio/threestudio/utils/init.py", line 1, in
from . import base
File "/home/dreamer/threestudio/threestudio/utils/base.py", line 7, in
from threestudio.utils.misc import get_device, load_module_weights
File "/home/dreamer/threestudio/threestudio/utils/misc.py", line 5, in
import tinycudann as tcnn
File "/home/dreamer/.local/lib/python3.10/site-packages/tinycudann/init.py", line 9, in
from tinycudann.modules import free_temporary_memory, NetworkWithInputEncoding, Network, Encoding
File "/home/dreamer/.local/lib/python3.10/site-packages/tinycudann/modules.py", line 51, in
C = importlib.import_module(f"tinycudann_bindings.{cc}_C")
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /home/dreamer/.local/lib/python3.10/site-packages/tinycudann_bindings/_86_C.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

Additional information

Working on an Ubuntu 22.4. Docker like in your Repo. I tried it on two different computers and I get the same error. A month ago, everything was still functioning, now I tried everything and nothing works unfortunately. Hopefully someone can help!

@quanqx
Copy link

quanqx commented May 31, 2024

same issue. waiting for a response

@quanqx
Copy link

quanqx commented May 31, 2024

[email protected]:~/MVDream-threestudio$ # MVDream without shading (memory efficient)
python launch.py --config configs/mvdream-sd21.yaml --train --gpu 0 system.prompt_processor.prompt="an astronaut riding a horse"
Traceback (most recent call last):
  File "/root/MVDream-threestudio/launch.py", line 237, in <module>
    main(args, extras)
  File "/root/MVDream-threestudio/launch.py", line 73, in main
    import threestudio
  File "/root/MVDream-threestudio/threestudio/__init__.py", line 36, in <module>
    from . import data, models, systems
  File "/root/MVDream-threestudio/threestudio/data/__init__.py", line 1, in <module>
    from . import co3d, image, multiview, uncond
  File "/root/MVDream-threestudio/threestudio/data/co3d.py", line 8, in <module>
    import cv2
  File "/opt/conda/lib/python3.10/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/opt/conda/lib/python3.10/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/opt/conda/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

@quanqx
Copy link

quanqx commented May 31, 2024

Anyone faced above error?

@quanqx
Copy link

quanqx commented May 31, 2024

@seasonSH Could you please support us?
Thank you!

@NoctemNana
Copy link
Author

NoctemNana commented Jun 1, 2024

I solved the ImportError by disabling the installation of the requirements.txt inside the docker. All the packages inside the requirements.txt need to be manually put inside the Docker.yaml. But not git+https://github.com/KAIR-BAIR/[email protected]
and git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
because they are causing the mismatch. Therefore only the other packages, for example RUN pip install xatlas, transformers,..etc,

Hope this helps

@LargeRaindrop
Copy link

Downgrading tiny-cuda-nn from 1.7 to 1.6 solves my problem. Hope this helps.

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

3 participants