Using libopencv-3.3.1 from JetPack-3.3 seems to work for a Ubuntu-16.04 docker image.
$ export URL="https://developer.download.nvidia.com/devzone/devcenter/mobile/jetpack_l4t/3.3/lw.xd42/JetPackL4T_33_b39/"
$ curl $URL/libopencv_3.3.1_t186_arm64.deb -so libopencv_arm64.deb
$ apt-get install ./libopencv_arm64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libopencv' instead of './libopencv_arm64.deb'
The following additional packages will be installed:
The following NEW packages will be installed:
libjasper1 libopencv libtbb2
0 upgraded, 3 newly installed, 0 to remove and 14 not upgraded.
Need to get 197 kB/8929 kB of archives.
After this operation, 48.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]
So, for building a working docker image for Ubuntu-16.04, I would have to use JetPack-4.4.1 for all the CUDA-10.0 stuff and resort to using JetPack-3.3 for the OpenCV-3.3.1 libraries and python bindings.
This problem won’t happen for an Ubuntu-18.04 docker image.
So the good news so far is that I’ve been able to successfully build docker images for ROS Kinetic for the Jetson AGX platform for both Ubuntu-16.04, with full support for OpenGL and CUDA acceleration inside docker containers. Most of the ROS samples that I’ve got appear to work so far. I’ll need to do some quick tests with some OpenCV samples, and also hold back the libopencv packages, so that they do not get over-written by the ros-kinetic-opencv-candidate package which also provides libopencv-3.3.1.
sudo apt-mark hold libopencv libopencv-dev libopencv-python libopencv-samples