您的浏览器与网页部分内容不兼容,请及时更新。 点击此处了解如何更新浏览器。

OK
网上商店

How to Use Basler USB Cameras in Docker Container?

The following article assumes that you are familiar with docker installation and docker commands.

Here is the configuration we are using:

  • Host OS : Ubuntu 20.04 and pylon 6.2
  • Guest OS : Ubuntu 20.04 and pylon 6.2

Let's start:

  1. Create a directory of your choice on your host system. e.g /home/user/dockerImage
  2. Copy the attached Dockerfile there
  3. Download and save a pylon Debian package into this directory
  4. Open a terminal, head tothe directory and execute the following command to generate a docker image based on public Ubuntu 20.04 image.

sudo docker build -t pylon .

This command also installs pylon in docker image.

5. run fresh built image using

sudo docker run -ti -v '/dev/bus/usb':'/dev/bus/usb' --privileged -e DISPLAY=$DISPLAY -v '/tmp/.X11-unix':'/tmp/.X11-unix' pylon

You will now see all Basler USB cameras connected to the host system in the docker container as well.

You can then carry on your work: run lsusb or build the grab sample and run it.

Docker file zip

我们很乐意为您提供协助

销售咨询
支持服务
中国区代理商
定制相机