stereolabs / zed-docker

Docker images for the ZED SDK
https://hub.docker.com/r/stereolabs/zed/
MIT License
52 stars 19 forks source link

Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found version "10.2") #36

Closed ggiuanni closed 2 years ago

ggiuanni commented 3 years ago

Hi,

I am writing to ask you for support as I am having difficulties in creating a development and deployment environment for ZED2 on the Nvidia Jetson Nano device.

For the realization of this environment it was decided to use Docker as also suggested in the documentation: https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/

The host machine has the following characteristics: OS: Ubuntu 20.04 RAM: 16GB CPU: Intel Core I7 10th gen GPU: Nvidia GeForce GTX 1660 Ti

Following the instructions here https://www.stereolabs.com/docs/docker/install-guide-linux/ I installed Docker and Nvidia Docker on the machine.

I followed the instructions of the first link to install QEMU and I tested by running the image "arm64v8 / ubuntu uname" and everything worked correctly.

At this point I followed the instructions in this link https://www.stereolabs.com/docs/docker/creating-your-image/

FROM stereolabs / zed: 3.5-devel-jetson-jp4.5

So that it went for a compatible build to be able to run on Jetson Nano.

At this point I ran the docker build -t hellozed: v1 command.

The error it returns to me is the following:

Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found version "10.2")

This error happens ONLY when I use Docker images for Jetson. If in line 1 of the Dockerfile I indicate a ZED docker image of an x86 system the build is successful.

Following other instructions found online I also proceeded to specify the nvidia runtime environment following the instructions given here: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#installing-on-ubuntu-and-debian

But that didn't change anything, I always get the same error.

I saw that the error is generated by CMakeLists.txt on line 22: it means when the CUDA installation is verified.

In the docker images made by nvidia l4t the libcudart.so file is never present so I can't even specify it manually when executing the cmake command.

The thing I don't understand is why the same project, with the same CMakeLists.txt file, completes the build correctly if the cmake command is run directly inside the Jetson Nano.

I therefore ask for support to understand if in this process it is necessary to perform further steps or if it was possible to have an example of a ZED development project that involves the use of Docker for the deployment on Jetson following the workflow indicated here: https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/#deploying-your-image-to-jetson

cosama commented 2 years ago

I just run into the same issue with jetpack 4.6, trying to build an image containing the zed-wrapper. Is there any reason why the ros-devel images are not build anymore? I would really like to have those, but the last one is docker pull stereolabs/zed:3.4-ros-devel-l4t-r32.3.1

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days