Went to run my bird camera this morning after loading 4.4, got the error below…
020-07-09 11:46:01.977034: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘libcudart.so.10.0’; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
2020-07-09 11:46:01.977101: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2020-07-09 11:46:01.977319: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘libcudart.so.10.0’; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
2020-07-09 11:46:01.977357: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Segmentation fault (core dumped)
What do you mean by “loading 4.4”? Did you flash the Jetson with a new release? Basically your program wants version 10.0 of libcudart.so dynamic library, and could not find it. The question is one of whether it was lost during an upgrade, or what actually is meant by “loading 4.4”.
import torch
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python3.6/dist-packages/torch/init.py”, line 81, in
from torch._C import *
ImportError: libcudart.so.10.0: cannot open shared object file: No such file or directory
Found this on the Pytorch Forum page:
The JetPack 4.4 production release (L4T R32.4.3) only supports PyTorch 1.6.0 or newer, due to updates in cuDNN.
You will have to rebuild OpenCV for JetPack 4.4. If you built from a sript you can probably just run it again. In the case of the pre-built docker image, there are multiple versions available, one for 4.3 (jp-r32.3.1-cv-4.3.0), and one for 4.4 (jp-r32.4.2-cv-4.3.0):
Re: PyTorch: You can post in that thread re: 1.6.0 not working and you’ll probably get a response quicker than here considering @dusty_nv watches it.
Re: OpenCV: If you’re running Nvidia’s scipt to build 4.1.1, that may not work out of the box (with cudnn anyway) since the cudnn version needs to be manually specified since 8.0. You might try my script instead.
Re: breakage: it’s mostly a package management issue I think. Much of it could be resolved if Nvidia pre-built and packaged certain things with JetPack itself, but there may be reasons they can’t. When underlying libraries are upgraded, sometimes it breaks things built from source. If there’s an apt package for the thing, then it gets updated at the same time.
@mdegans those OpenCV errors look similar to when I went to build PyTorch - there were some previously-deprecated functions removed from cuDNN 8.0. The OpenCV version might need updated (assuming they have patched master) if you want to build it with cuDNN support. What I did with PyTorch was to move to the latest release where they had updated their code to support cuDNN 8.0.
Note that the version of OpenCV that ships with JetPack should still be fine, I am assuming from above that a custom build of OpenCV is being referred to (e.g. with additional build options enabled). When you upgrade versions of JetPack that change the CUDA version, you typically need to also update packages that have dependencies on CUDA (e.g. PyTorch, TensorFlow, ect).
I am running a build in Docker on an NX using r32.4.3 base image, which has a bunch of fixes (yay!). I will let you know if it suceeds and push the image after some basic tests if it does. After that, I’ll run it outside Docker on a fully updated 4.4 rootfs. If I can replicate the problem, I will let you know and try to fix it.
I’m building OpenCV 4.3.0 which did not recognize cuDNN out of the box. I had to manually specify -D CUDNN_VERSION='8.0'. It did build with 4.4 DP, but we’ll see…
Dustin is right. OpenCV included in the apt repos should work fine, but I don’t believe it has any of the CUDA stuff, so it’ll be using your CPU exclusively. Depending on your use, that may be acceptable. I believe it’s installed by default. You can check with opencv_version --verbose. My NX shows:
OpenCV itself does not use the GPU for the most part since it’s: a. very old (this is not necessarily bad, but most code is written for the CPU) b. an Intel project
In any case, running my script with ./build_opencv.sh master (specifying master branch explicitly), will likely build, and it will have GPU acceleration (but only for the cuda module, eg. cv2.cuda.resize not cv.resize).
No matter whose script you use, most code you will find on the internet will have to be rewritten to use the cuda module. There is an experimental graph api which aims to be independent of computation backend, but it currently has no cuda support.