EVA SDK Docker User's Manual_for 4.0
  • 05 Sep 2023
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

EVA SDK Docker User's Manual_for 4.0

  • Dark
    Light

Article Summary

EVA SDK Docker User's Maunal

Preface

Copyright

Copyright © 2023 ADLINK Technology, Inc. This document contains proprietary information protected by copyright. All rights are reserved. No part of this manual may be reproduced by any mechanical, electronic, or other means in any form without prior written permission of the manufacturer.

Disclaimer

The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer. In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.

Trademarks

Product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of their respective companies.



1 Docker EVA repository tag list

The following lists are EVA docker repository tags.

  • adlinkdocker/eva_srep
    • x86_64
      • Runtime
        • r4_runtime
    • aarch64
      • Runtime
        • r4_aarch64_runtime
        • r4_ubuntu18.04_aarch64 


2 How to install Docker

If you are using the ARM platform that has installed the Jetpack environment, please ignore this step.

2.1 Install Docker

$ sudo apt-get install -y docker.io


2.2 Enable to use NVidia GPU in Docker (optional)

Docker needs to install the NVidia container toolkit and then we can specify to use GPU in the run command.

Here is the installation guide link

https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker



3 How to use EVA with Docker

3.1 Pull docker image

Depending on your platform and requirement to pull a suitable docker image, for example here will pull 4.0 version of EVA in the X86_64 system

$ docker pull adlinkdocker/eva_srep:r4_runtime


3.2 Enable X server permission

Docker will use root user but x server default does not open permission root user to access. Therefore we need to open permission before launching our EVA Docker.

$ xhost +

This command only needs to execute one time unless reset permission of X Server like reboot system. And close terminal will not reset permission of X server.

3.3 Run EVA docker image

Use docker run command to launch 4.0 EVA container based on EVA Docker image.

$ docker run -ti --net=host --privileged --gpus all -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 -v /tmp/.X11-unix/:/tmp/.X11-unix -v ~/.Xauthority:/root/.Xauthority -v /dev:/dev OTHER_OPTIONS adlinkdocker/eva_srep :r4_runtime

root@HOSTNAME:/#

After running this command we will enter the bash of this container, we can launch the GStreamer command like a normal terminal.

# gst-launch-1.0 videotestsrc ! ximagesink


3.4 Docker run option detail

3.1 Pass X server permission

Add the following run options:

  • --net=host
  • -e DISPLAY=$DISPLAY
  • -e X11_QT_NO_MITSHM=1
  • -v /tmp/.X11--unix:/tmp/.X11–unix
  • -v ~/.Xauthority:/root/.Xauthority

3.2 Pass hardware device access permission

Add the following run options:

  • --privileged
  • -v /dev:/dev

3.3 Pass Nvidia GPU access capability

Add the following run options:

  • --gpus all

3.4 Attach executing EVA container

The EVA docker image will set the EVA execution environment by default before entering the bash script.

If you attach executing EVA with a normal bash script, you will need to set up the environment after attaching.

Therefore, we can run the following command to automatically set up the environment before entering the bash script.

# docker exec -ti CONTAINER_ID /entrypoint.sh


4 How to remove Docker container and image

4.1 Remove docker container

$ docker rm CONTAINER_NAME

CONTAINER_NAME: Enter your container name or container ID.

4.2 Remove docker image

$ docker rmi adlinkdocker/eva_srep :r4_runtime

You must remove all containers from the image before removing the docker image.



5 Troubleshooting

5.1 Can not display in docker

If the container does not have permission to access the X server, the GStreamer launch will raise an exception with initializing X failed such as the following figure.

Refer to the "Enable X server permission" section to enable permission outside the container before the launch command.

It is recommended to restart the container after configuring X server permission.

# gst-launch videotestsrc ! ximagesink

...

ERROR: Pipeline doesn't want to pause.

ERROR: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Could not initialise X output

Additional debug info:

ximagesink.c(860): gst_x_image_sink_xcontext_get (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:

...


5.2 Can not execute with NVidia argument

It will fail with the following message if the system does not have been installed the NVidia container toolkit.

Please refer to the "Enable to use GPU in Docker" section.

# docker run ... --gpus all ...

docker: Error response from daemon: Unknown runtime specified nvidia.

See 'docker run --help'.


5.3 Open EVA IDE failed

Running IDE will fail with the following message if the system does not have the correct DISPLAY environment set up or does not have permission to access the X server.

Please refer to the "Enable X server permission" section to set the permission.

# EVA_IDE

...

qt.qpa.xcb: could not connect to display /private/tmp/com.apple.launchd.WdnPoz7hwR/org.macosforge.xquartz:0

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

...



Was this article helpful?