stereolabs / zed-docker

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

compiling errors in stereolabs/zed:3.7-tools-devel-l4t-r32.5 image. No libcudart #44

Closed Barsay closed 2 years ago

Barsay commented 2 years ago

Preliminary Checks

Description

I am trying to compile an executable inside the zed image for L4T, both on a jetson AGX Xavier and a Jetson Nano. Here is my dockerfile:

FROM stereolabs/zed:3.7-tools-devel-l4t-r32.5

ENV DEBIAN_FRONTEND=noninteractive

RUN mkdir /opt/me/
WORKDIR /opt/me/

RUN apt update

RUN apt install -y sudo git build-essential wget make cmake vim bash software-properties-common libusb-1.0-0-dev
COPY . .
RUN sudo rm -rf build

RUN mkdir build && cd build && cmake  -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs  -DCUDA_CUDART_LIBRARY=/usr/local/cuda/lib64/stubs  -DCMAKE_CXX_FLAGS='-Wl,--allow-shlib-undefined' ..
RUN cd build && cmake --build .

The problem is the linker is not able to find CUDART. I did some research, and run a find / -name "libcudart*", and there is no libcudart.so found anywhere.

Overriding ${CUDA_CUDART_LIBRARY} with -DCMAKE_CUDA_CUDART_LIBRARY = "/usr/local/cuda/libcudart.so" doesn't help, since there is no libcudart.so installed in the image.

Steps to Reproduce

  1. Replicate Dockerfile as above, on a Jetson Nano or Xavier
  2. sudo docker build . ...

Expected Result

build successfully

Actual Result

cudart not found

ZED Camera model

ZED

Environment

BOARD: Jetson AGX Xavier, Jetson NANO

Anything else?

No response

obraun-sl commented 2 years ago

Did you try to simply remove the cuda_cudart_library flag (it's not needed, as in jetson cudart is provided as static lib) :

RUN mkdir build && cd build && cmake -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs -DCMAKE_CXX_FLAGS='-Wl,--allow-shlib-undefined' ..

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

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