Pytorch3d: How to use it with cuda11 and rtx3090?

Created on 2 Nov 2020  ·  12Comments  ·  Source: facebookresearch/pytorch3d

How to use it with cuda11 and rtx3090?

Most helpful comment

With cuda 11, you have to use pytorch 1.7, as I think you know. The latest release of pytorch3d was earlier than pytorch 1.7. Unless you want to build pytorch3d from source, you need to use the nightly build of pytorch3d (which does have a builds with pytorch 1.7 and cuda 11). I recommend you start again in a new conda environment, to avoid much confusion.

conda create -n pytorch3d_new python=3.8
conda activate pytorch3d_new
conda install -c pytorch pytorch=1.7.0 torchvision cudatoolkit=11.0
conda install -c conda-forge -c fvcore fvcore
conda install -c pytorch3d-nightly pytorch3d

All 12 comments

What messages are you receiving during the installation?

What messages are you receiving during the installation?

I can install it and python can run 'import pytorch3d', but it can't run 'from pytorch3d.structures import Meshes'.

Do you mind copy here the message that you received?

Do you mind copy here the message that you received?

Now I only have my laptop with me. I'll show it to you in a few hours.

Do you mind copy here the message that you received?

Python 3.8.6 (default, Oct 6 2020, 03:22:36)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
from pytorch3d.structures import Meshes

Traceback (most recent call last):
File "", line 1, in
File "/home/jiang/.local/lib/python3.8/site-packages/pytorch3d/structures/__init__.py", line 4, in
from .pointclouds import Pointclouds
File "/home/jiang/.local/lib/python3.8/site-packages/pytorch3d/structures/pointclouds.py", line 5, in
from .. import ops
File "/home/jiang/.local/lib/python3.8/site-packages/pytorch3d/ops/__init__.py", line 5, in
from .graph_conv import GraphConv
File "/home/jiang/.local/lib/python3.8/site-packages/pytorch3d/ops/graph_conv.py", line 8, in
from pytorch3d import _C
ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory

I don't think it is a problem of 3090 GPU. Did you follow the instructions on how to install pytorch3D? https://github.com/facebookresearch/pytorch3d/blob/master/INSTALL.md?

I don't think it is a problem of 3090 GPU. Did you follow the instructions on how to install pytorch3D? https://github.com/facebookresearch/pytorch3d/blob/master/INSTALL.md?

Can Pytorch1.7 (CUDA11) only be installed with Conda? I install it with pip.

Yes. You can install pytorch1.7 with conda. But you should ask this question on the pytorch github page. ;-)

With cuda 11, you have to use pytorch 1.7, as I think you know. The latest release of pytorch3d was earlier than pytorch 1.7. Unless you want to build pytorch3d from source, you need to use the nightly build of pytorch3d (which does have a builds with pytorch 1.7 and cuda 11). I recommend you start again in a new conda environment, to avoid much confusion.

conda create -n pytorch3d_new python=3.8
conda activate pytorch3d_new
conda install -c pytorch pytorch=1.7.0 torchvision cudatoolkit=11.0
conda install -c conda-forge -c fvcore fvcore
conda install -c pytorch3d-nightly pytorch3d

Yes. You can install pytorch1.7 with conda. But you should ask this question on the pytorch github page. ;-)

Thanks!

With cuda 11, you have to use pytorch 1.7, as I think you know. The latest release of pytorch3d was earlier than pytorch 1.7. Unless you want to build pytorch3d from source, you need to use the nightly build of pytorch3d (which does have a builds with pytorch 1.7 and cuda 11). I recommend you start again in a new conda environment, to avoid much confusion.

conda create -n pytorch3d_new python=3.8
conda activate pytorch3d_new
conda install -c pytorch pytorch=1.7.0 torchvision cudatoolkit=11.0
conda install -c conda-forge -c fvcore fvcore
conda install -c pytorch3d-nightly pytorch3d

Thanks!

@cczarnocki In future, please err on the side of opening a new issue whenever you have a new problem.
There are instructions in this thread which are out of date.

You don't have the prerequisites of PyTorch3D installed. Most significantly, you don't have iopath. This wasn't a requirement until fairly recently.
If you set up a new environment with PyTorch1.7.0 and cudatoolkit 11.0 in the way described in Install.md you should then be able to install the nightly build of PyTorch3D.
If not, please open a new issue and give all the details.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ruslanvasylev picture ruslanvasylev  ·  3Comments

NotAnyMike picture NotAnyMike  ·  3Comments

TheshowN picture TheshowN  ·  3Comments

abhi1kumar picture abhi1kumar  ·  3Comments

aluo-x picture aluo-x  ·  3Comments