Issue accessing nvv4l codec on xavier with docker images

(1) I am running a docker instance on xavier. I have a gstreamer project where I want to use nvv4l2 codecs. Various .so libraries from Nvidia have been installed and ENV variables have been set to point to installation folders.
However, I get following errors when I try to use nvv4l2 encoder or decoder

0:00:00.308269491     9   0x55847a1c00 WARN                    v4l2 v4l2_calls.c:98:gst_v4l2_get_capabilities:<nvv4l2h265enc0> error: Error getting capabilities for device '/dev/nvhost-msenc': It isn't a v4l2 driv
er. Check if it is a v4l1 driver.
0:00:00.308325749     9   0x55847a1c00 WARN                    v4l2 v4l2_calls.c:98:gst_v4l2_get_capabilities:<nvv4l2h265enc0> error: system error: Inappropriate ioctl for device

(2) Investing this issue further it turned out that issue is caused by libv4l2_nvvideocodec.so not being at hard-coded location /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvvideocodec.so
If I manually create a symlink from above location to the installed libv4l2_nvvideocodec.so, then stuff works ok.

(3) I have done a grep in relevant folder to check which software expects above hard-coded path. But grep does not have any hits. So, I am wondering why we need the libv4l2_nvvideocodec.so at above hardcoded path

Hi there, what base image are you using in your Dockerfile?