deviceQuery succeed in host, but failed in docker

Hi Guys,
I installed cuda on xavier platfrom(host), and run “deviceQuery” succesfully with returning PASS.
but in my docker(docker image in host), it’s return:
cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
Result = FAIL

both docker img and host run “tegrastatus”, return normally.
nvidia@in_dev_docker:/usr/local/cuda/samples/1_Utilities/deviceQuery$ /apollo/tegrastats
RAM 2796/15690MB (lfb 7x2MB) SWAP 720/7845MB (cached 36MB) CPU [13%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190] EMC_FREQ 0% GR3D_FREQ 0% AO@40.5C GPU@40C Tboard@41C Tdiode@43.5C AUX@40.5C CPU@40.5C thermal@40.2C PMIC@100C GPU 155/155 CPU 465/465 SOC 931/931 CV 0/0 VDDRQ 0/0 SYS5V 1620/1620

docker mapping directory from host lists here,and also run ldconfig to config the path:

“/usr/lib/aarch64-linux-gnu” is not mapping, use docker its own, but did some library linking, as below:
/usr/lib/aarch64-linux-gnu/ -> tegra/
/usr/lib/aarch64-linux-gnu/ -> tegra/
/usr/lib/aarch64-linux-gnu/ -> from host)

Do I miss something? host can run devicequery, it says the cuda driver is correct, but, not clear failed in docker.

Dear asnail,

Could you please get some hints from
Unfortunately, we do not officially support docker.

sudo ./deviceQuery PASSED!
./deviceQuery always Failed!

chmod 777 /dev/nvidia* not works!

what’s the problem?

Dear asnail,

It seems like a permission issue.
Could you try to give sudo permission with below? Thanks.
sudo chmod 777

Hi Steve
I tried sudo, forgot put it on, it’s not working, but I found sudo chmod 777 /dev/*, it works!
I am troubleshooting this issue which node caused the permission issue.

Hi asnail,

Any result can be shared?

issue resolved with sudo chmod 666 /dev/nv*
default permission is “-660 root:video” afer installed.