stereolabs / zed-docker

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

Python API: Cannot import pyzed.sl in runtime and devel containers #37

Closed mrkvlttrs closed 2 years ago

mrkvlttrs commented 2 years ago

Preliminary Checks

Description

In the "runtime" and "devel" docker images, it is not possible to import pyzed.sl in a python shell, because libpng16.so.16 and libgomp.so.1 are missing. This issue does not occur in the "devel-gl" images.

Steps to Reproduce

  1. Use docker to pull a "runtime" or "devel" container, such as 3.6-devel-cuda11.4-ubuntu20.04

    $ docker run --gpus all -it --privileged stereolabs/zed:3.6-devel-cuda11.4-ubuntu20.04
  2. In the container, open up a python shell

    $ python3.8
  3. Import pyzed.sl

    >>> import pyzed.sl as sl

Expected Result

Import succeeds, and sl can be used to create the camera object, etc

Actual Result

>>> import pyzed.sl as sl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libpng16.so.16: cannot open shared object file: No such file or directory

After installing libpng-dev in the container:

>>> import pyzed.sl as sl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libgomp.so.1: cannot open shared object file: No such file or directory

After also installing libgomp1 in the container, import succeeds. I am unaware of possible other missing libraries required for the python API to function.

ZED Camera model

ZED2

Environment

OS: Ubuntu 20.04
Container OS: as specified in stereolabs/zed dockerfile
CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
GPU: Nvidia Quadro P600
SDK: tried with 3.6 and 3.5 containers

Anything else?

Seems to be solved by installing libpng-dev and libgomp1 libraries in the container.

$ apt-get update && apt-get install -y libpng-dev libgomp1
python3.8
>>> import pyzed.sl as sl
adujardin commented 2 years ago

Thank you for reporting the issue, it will be fixed in the next patch (3.6.2)