Error When Importing build_model for Detectron2

Viewed 360

I'm trying to run the following:

from detectron2.modeling import build_model

Which is returning the following:

ImportError: libtorch_cuda_cu.so: cannot open shared object file: No such file or directory

I'm running this in Google Colab. When I run:

!nvidia-smi
!pip list -v | grep torch

It returns

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.19.01    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla K80           Off  | 00000000:00:04.0 Off |                    0 |
| N/A   32C    P8    29W / 149W |      0MiB / 11441MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
torch                         1.8.1+cu101        /usr/local/lib/python3.7/dist-packages pip      
torchsummary                  1.5.1              /usr/local/lib/python3.7/dist-packages pip      
torchtext                     0.9.1              /usr/local/lib/python3.7/dist-packages pip      
torchvision                   0.9.1+cu101        /usr/local/lib/python3.7/dist-packages pip     

Based on that information I installed Detectron using the command from here.

I copied and pasted that import from here

What am I missing?

0 Answers
Related