Required Info:
- Software Version
DRIVE OS 6.0.6 - Target OS
Linux - SDK Manager Version
1.9.2.10884 - Host Machine Version
native Ubuntu Linux 20.04 Host installed with DRIVE OS DOCKER Containers
Describe the bug
following with this topic https://developer.nvidia.com/blog/running-docker-containers-directly-on-nvidia-drive-agx-orin/#entry-content-comments.
in target-docker-container, sudo /usr/local/driveworks/bin/sample_hello_world
failed with many errors.
To Reproduce
# start and into the container
./docker/run/orin_start.sh
./docker/run/orin_into.sh
the csv in /etc/nvidia-container-runtime/host-files-for-container.d/
is here
the keypoint of orin_start.sh
is
+ docker run --runtime nvidia --gpus all -it -d --privileged --name gw_orin_20.04_nvidia -e DOCKER_USER=nvidia -e USER=nvidia -e DOCKER_USER_ID=1000 -e DOCKER_GRP=nvidia -e DOCKER_GRP_ID=1000 -e DOCKER_IMG=arm64v8/ros:foxy -e USE_GPU=1 -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,video,utility,display -e DISPLAY -v /home/nvidia/zhensheng/orin_ws/nv_driveworks_demo/target:/target -v /usr/local/driveworks-5.10:/usr/local/driveworks-5.10 -v /usr/local/cuda-11.4:/usr/local/cuda-11.4 -v /dev:/dev -v /home/nvidia/zhensheng/cuda-sample:/home/nvidia/zhensheng/cuda-sample -v /home/nvidia/.cache:/home/nvidia/.cache -v /dev/bus/usb:/dev/bus/usb -v /media:/media -v /tmp/.X11-unix:/tmp/.X11-unix:rw -v /etc/localtime:/etc/localtime:ro -v /usr/src:/usr/src -v /lib/mgaules:/lib/mgaules --net host --ipc host --cap-add SYS_ADMIN --cap-add SYS_PTRACE -w /target --add-host in_orin_docker:127.0.0.1 --add-host tegra-ubuntu:127.0.0.1 --hostname in_orin_docker --shm-size 2G -v /dev/null:/dev/raw1394 arm64v8/ros:foxy /bin/bash
Expected behavior
# in target-orin-host
/usr/local/driveworks/bin/sample_hello_world
*************************************************
Welcome to Driveworks SDK
[04-02-2023 08:03:35] Platform: Detected Drive Orin P3710
[04-02-2023 08:03:35] TimeSource: monotonic epoch time offset is 1675150951129556
[04-02-2023 08:03:35] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[04-02-2023 08:03:35] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[04-02-2023 08:03:35] PTP Time is available from Eth Driver
[04-02-2023 08:03:35] Adding variable DW_Base:DW_Version
[04-02-2023 08:03:35] Added variable DW_Base:DW_Version
[04-02-2023 08:03:35] Platform: number of GPU devices detected 1
[04-02-2023 08:03:35] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[04-02-2023 08:03:35] Platform: currently selected GPU device integrated ID 0
[04-02-2023 08:03:35] CUDLAEngine:getDLACount: CUDLA version is = 1003000
[04-02-2023 08:03:35] CUDLAEngine:getDLACount: Number of DLA devices = 2
[04-02-2023 08:03:35] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[04-02-2023 08:03:35] Context::mountResourceCandidateDataPath resource FAILED to mount from '/home/nvidia/zhensheng/cuda-sample/samples/1_Utilities/deviceQuery/data': VirtualFileSystem: Failed to mount '/home/nvidia/zhensheng/cuda-sample/samples/1_Utilities/deviceQuery/data/resources.pak'
[04-02-2023 08:03:35] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/bin/../data
[04-02-2023 08:03:35] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/bin/../data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/bin/../data/resources.pak'
[04-02-2023 08:03:35] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/data
[04-02-2023 08:03:35] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/data/resources.pak'
[04-02-2023 08:03:35] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/bin/../lib/libdw_base.so.5.10
[04-02-2023 08:03:35] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/targets/aarch64-Linux/lib/libdw_base.so.5.10
[04-02-2023 08:03:35] SDK: No resources(.pak) mounted, some modules will not function properly
[04-02-2023 08:03:35] egl::Display: found 1 EGL devices
[04-02-2023 08:03:35] egl::Display: use drm device: drm-nvdc
[04-02-2023 08:03:36] TimeSource: monotonic epoch time offset is 1675150951129557
[04-02-2023 08:03:36] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[04-02-2023 08:03:36] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[04-02-2023 08:03:36] PTP Time is available from Eth Driver
[04-02-2023 08:03:36] Initialize DriveWorks SDK v5.10.87
[04-02-2023 08:03:36] Release build with GNU 9.3.0 from buildbrain-branch-0-g9a5b4670e12 against Drive PDK v6.0.6.0
Context of Driveworks SDK successfully initialized.
Version: 5.10.87
GPU devices detected: 1
[04-02-2023 08:03:36] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[04-02-2023 08:03:36] Platform: currently selected GPU device integrated ID 0
----------------------------------------------
Device: 0, Orin
CUDA Driver Version / Runtime Version : 11.8 / 11.4
CUDA Capability Major/Minor version number: 8.7
Total amount of global memory in MBytes:28458
Memory Clock rate Khz: 1275000
Memory Bus Width bits: 128
L2 Cache Size: 4194304
Maximum 1D Texture Dimension Size (x): 131072
Maximum 2D Texture Dimension Size (x,y): 131072, 65536
Maximum 3D Texture Dimension Size (x,y,z): 16384, 16384, 16384
Maximum Layered 1D Texture Size, (x): 32768 num: 2048
Maximum Layered 2D Texture Size, (x,y): 32768, 32768 num: 2048
Total amount of constant memory bytes: 65536
Total amount of shared memory per block bytes: 49152
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per multiprocessor: 1536
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): 1024,1024,64
Max dimension size of a grid size (x,y,z): 2147483647,65535,65535
Maximum memory pitch bytes: 2147483647
Texture alignment bytes: 512
Concurrent copy and kernel execution: Yes, copy engines num: 2
Run time limit on kernels: No
Integrated GPU sharing Host Memory: Yes
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID: 0, Device PCI Bus ID: 0, Device PCI location ID: 0
Compute Mode: Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)
Concurrent kernels: 1
Concurrent memory: 0
[04-02-2023 08:03:36] Releasing Driveworks SDK Context
Happy autonomous driving!
Actual behavior
# in target-docker-container
sudo /usr/local/driveworks/bin/sample_hello_world
*************************************************
Welcome to Driveworks SDK
[04-02-2023 08:05:43] Platform: Detected Drive Orin P3710
[04-02-2023 08:05:43] TimeSource: monotonic epoch time offset is 1675150951129556
[04-02-2023 08:05:43] TimeSourceVibranteLinux: detect valid PTP interface mgbe2_0
[04-02-2023 08:05:43] TimeSource Nvpss : PTP ioctl returned error. Synchronized time will not be available from this timesource.
[04-02-2023 08:05:43] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to mgbe2_0
[04-02-2023 08:05:43] PTP Time is available from Eth Driver
[04-02-2023 08:05:43] Adding variable DW_Base:DW_Version
[04-02-2023 08:05:43] Added variable DW_Base:DW_Version
[04-02-2023 08:05:43] Platform: number of GPU devices detected 1
[04-02-2023 08:05:43] Platform: currently selected GPU device 0, Resource Data Dir: trt_08_05_10_03, Arch: ga10b
[04-02-2023 08:05:43] Platform: currently selected GPU device integrated ID 0
[04-02-2023 08:05:43] CUDLAEngine:getDLACount: Error in cudlaGetVersion = 2147483647
[04-02-2023 08:05:43] CUDLAEngine:getDLACount: Error in cudlaDeviceGetCount = 2147483647
[04-02-2023 08:05:43] Context::mountResourceCandidateDataPath resource FAILED to mount from './resources': VirtualFileSystem: Failed to mount './resources/resources.pak'
[04-02-2023 08:05:43] Context::mountResourceCandidateDataPath resource FAILED to mount from '/home/nvidia/data': VirtualFileSystem: Failed to mount '/home/nvidia/data/resources.pak'
[04-02-2023 08:05:43] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/bin/../data
[04-02-2023 08:05:43] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/bin/../data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/bin/../data/resources.pak'
[04-02-2023 08:05:43] Context::findDataRootInPathWalk data/DATA_ROOT found at: /usr/local/driveworks-5.10/data
[04-02-2023 08:05:43] Context::mountResourceCandidateDataPath resource FAILED to mount from '/usr/local/driveworks-5.10/data': VirtualFileSystem: Failed to mount '/usr/local/driveworks-5.10/data/resources.pak'
[04-02-2023 08:05:43] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/bin/../lib/libdw_base.so.5.10
[04-02-2023 08:05:43] Context::findResourcesPackageInPathWalk: Could not find ./resources/resources.pak in upto 7 parent directories from /usr/local/driveworks-5.10/targets/aarch64-Linux/lib/libdw_base.so.5.10
[04-02-2023 08:05:43] SDK: No resources(.pak) mounted, some modules will not function properly
[04-02-2023 08:05:43] egl::Display: found 1 EGL devices
[04-02-2023 08:05:43] egl::Display: use drm device: drm-nvdc
[04-02-2023 08:05:43] egl::Display: Could not init EGL
[04-02-2023 08:05:43] Driveworks exception thrown: DW_CANNOT_CREATE_OBJECT: Could not init EGL
Cannot init SDK
Additional context
- The
sudo permission
also happen related with [BUG] target-docker-container running cuda-samples require unintended extra permission (nvidia.com) - Could you help to provide the tutorial of how to use driveworks and dwcgf in the target-docker-container?