docker: camera_v4l2_cuda error

hello nv team!

i can’t run the sample camera_v4l2_cuda of the tegra_multimedia_api in vitual docker container.
it showed this error below

nvidia@4018b7faca4a~/jetpack3.2/tegra_multimedia_api/samples/12_camera_v4l2_cuda $ ./camera_v4l2_cuda -d /dev/video0 -s 640x480 -f YUYV -n 30 -c
Error: Can't initialize nvrm channel
Error: Can't initialize nvrm channel
Couldn't create ddkvic Session: Cannot allocate memory
WARN: camera_initialize(): (line:239) The desired format is not supported
[INFO] (NvEglRenderer.cpp:109) <renderer0> Setting Screen width 1920 height 1080
[ERROR] (NvEglRenderer.cpp:204) <renderer0> Unable to initialize egl library
[ERROR] (NvEglRenderer.cpp:152) <renderer0> Got ERROR closing display
ERROR: display_initialize(): (line:261) Failed to create EGL renderer
ERROR: init_components(): (line:286) Failed to initialize display
ERROR: main(): (line:530) Failed to initialize v4l2 components
nvbuf_utils: dmabuf_fd 0 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
App run failed

this is my jetson tx2 environment

[envirionment]
Jetson TX2 R28.2.1
Docker version 1.13.1

[docker run argument]

docker run -v /mnt/log:/mnt/log:rw \
           -v /dev:/dev:rw \
          --device=/dev/video0 \
		  --device=/dev/i2c-0 \
		  --device=/dev/nvhost-vic \
		  -e DISPLAY=$DISPLAY \
		  -v /tmp/.X11-unix:/tmp/.X11-unix \
          -i -t test-rep/test-product:3b480b5ae6ee /bin/bash

it operates correctly in its real environment.
i don’t know what the nvrm it is??
i will wait your hint
previously thanks

Hi parkjeho,
The sample is for USB cameras or YUV sensors through v4l2. Do you connect either kind of camera?

Hi DaneLLL,

yes, i do and i verified the camera operate correctly in my tx2 board.
but when i play the same sample program in the virtual docker, especially in the init_components () function, it show the error message above
now, i am doing debug but i have no idea the reason yet

I think we may not support it running in docker mode. The error messages show it cannot successfully initialize hardware component:

Error: Can't initialize nvrm channel
Error: Can't initialize nvrm channel
Couldn't create ddkvic Session: Cannot allocate memory

hi DaneLLL,

it sounds bad… if it is true, i want to know where the messages come from ??

The message is from prebuilt lib libnvos.so, indicating error in initializing HW components.

Hi DaneLLL,

thanks ! but i resolved this issue.

@parkjeho can you elaborate how you solved the issue?