Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
Jetson Orin 32GB Developer Kit
• DeepStream Version
NGC DeepStream-l4t nvcr.io/nvidia/deepstream-l4t:6.2-triton
• JetPack Version (valid for Jetson only)
JetPack 5.1.1
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
bugs
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
【Reproduction Steps】
1. Launch docker container.
sudo docker run --runtime nvidia --rm -it nvcr.io/nvidia/deepstream-l4t:6.2-triton
2. Check apt installed library
apt list --installed | grep libav
We note here that libavcodec58 is installed.
3. Check .so file
ls -l /usr/lib/aarch64-linux-gnu/libav*
For libavcodec58, libavcodec.so.58.54.100 should exist, but does not.
This is the initial state of the container.
【What is the problem?】
Anything that requires this library, e.g. opencv, will result in an error.
4. install libavcodec-dev
If I install libavcodec-dev, symbolic links to non-existent files will be created.
apt install -y libavcodec-dev
ls -l /usr/lib/aarch64-linux-gnu/libav*
5. install opencv
apt-get install -y --no-install-recommends \
libopencv \
libopencv-dev \
libopencv-python \
libopencv-samples \
opencv-licenses
6. python import cv2
python3 -c "import cv2"
Error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.8/dist-packages/cv2/__init__.py", line 180, in <module>
bootstrap()
File "/usr/lib/python3.8/dist-packages/cv2/__init__.py", line 152, in bootstrap
native_module = importlib.import_module("cv2")
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libavcodec.so.58: cannot open shared object file: No such file or directory
【Solution】
Uninstall the problematic apt packages and reinstall them.
7. Uninstall
apt remove -y libavcodec58 libavutil56
apt install -y libavcodec-dev
apt list --installed | grep libav
ls -l /usr/lib/aarch64-linux-gnu/libav*
8. libvpx6
To import opencv in python, libvpx6 must also be modified.
apt remove -y libvpx6
apt install -y libvpx6
9. install opencv
apt-get install -y --no-install-recommends \
libopencv \
libopencv-dev \
libopencv-python \
libopencv-samples \
opencv-licenses
10. python import cv2
import cv2 can now be executed without error.
python3 -c "import cv2"
【Why does this problem occur?】
I wanted to use opencv built for L4T.
Is this a specific problem that occurs with the combination of JetPack 5.1.1 and nvcr.io/nvidia/deepstream-l4t:6.2-triton (which should be for JetPack 5.1)?
Or is the problem occurring on the container side?
This problem did not occur with JetPack 4.6.1 and nvcr.io/nvidia/deepstream-l4t:6.0.1-triton.
It was fun because it is a rare problem.