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

train.py : ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory #67

Open
bring-nirachornkul opened this issue May 27, 2024 · 3 comments

Comments

@bring-nirachornkul
Copy link

bring-nirachornkul commented May 27, 2024

Torch version: 1.9.1.post3
CUDA version: 11.1
Python Version : 3.7
Pytorch3D : 0.7.6

Hardware :
CPU : AMD Ryzen 9 5900X 12-Core Processor
GPU : RTX 3090
RAM : 64 GBs
Linux OS : Ubuntu 23.04

When I run python train.py then this error occurred :

(v2a) blinkdrive@blinkdrive-System-Product-Name:~/Documents/Projects/Summer2024/02vid2avatar/code$ python train.py
Traceback (most recent call last):
  File "train.py", line 1, in <module>
    from v2a_model import V2AModel
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/v2a_model.py", line 3, in <module>
    from lib.model.v2a import V2A
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/v2a.py", line 4, in <module>
    from .deformer import SMPLDeformer
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/deformer.py", line 4, in <module>
    from pytorch3d import ops
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/__init__.py", line 7, in <module>
    from .ball_query import ball_query
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/ball_query.py", line 10, in <module>
    from pytorch3d import _C
ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory
@MoyGcc
Copy link
Owner

MoyGcc commented May 27, 2024

Hi,

It's an installation problem of PyTorch3D. Could you double check that you have installed it successfully (with CUDA enabled)? You can refer to https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md for detailed instructions.

@bring-nirachornkul
Copy link
Author

bring-nirachornkul commented May 27, 2024

Hi,

It's an installation problem of PyTorch3D. Could you double check that you have installed it successfully (with CUDA enabled)? You can refer to https://github.com/facebookresearch/pytorch3d/blob/main/INSTALL.md for detailed instructions.

I have to these steps already. Here is the error after run train.py

(v2a) blinkdrive@blinkdrive-System-Product-Name:~/Documents/Projects/Summer2024/02vid2avatar/code$ python train.py
Traceback (most recent call last):
  File "train.py", line 1, in <module>
    from v2a_model import V2AModel
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/v2a_model.py", line 3, in <module>
    from lib.model.v2a import V2A
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/v2a.py", line 4, in <module>
    from .deformer import SMPLDeformer
  File "/home/blinkdrive/Documents/Projects/Summer2024/02vid2avatar/code/lib/model/deformer.py", line 4, in <module>
    from pytorch3d import ops
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/__init__.py", line 5, in <module>
    from .graph_conv import GraphConv
  File "/home/blinkdrive/miniconda3/envs/v2a/lib/python3.7/site-packages/pytorch3d/ops/graph_conv.py", line 8, in <module>
    from pytorch3d import _C
ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory

@MoyGcc
Copy link
Owner

MoyGcc commented May 30, 2024

Could you refer to the previous comment #49 (comment)? It's basically the unsuccessful installation of PyTorch3D (with CUDA). You can feel free to change the python/torch/cuda versions to match some prebuilt wheels of PyTorch3D which should ensure a bug-free installation.

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