genicam / harvesters

Image Acquisition Library for GenICam-based Machine Vision System
Apache License 2.0
501 stars 86 forks source link

Using harvesters inside a docker container #379

Open BaileyHelfer opened 1 year ago

BaileyHelfer commented 1 year ago

I am trying to get harvesters working inside a docker container. Has someone been able to do this? Currently I am installing a GenTL producer inside the container and using that CTI file. When trying to find a camera I can't seem to have it in my device info list. Not sure if this is a docker or harvesters issue but curious if someone here has already gotten data acquisition from inside a container. Thanks.

jcormier commented 1 year ago

Are you trying to connect to a USB camera? Getting USB devices inside the docker will take some configuration. No idea how to do it but google might provide some guidance to see if its even possible.

On Thu, Nov 17, 2022 at 3:32 PM Bailey @.***> wrote:

I am trying to get harvesters working inside a docker container. Has someone been able to do this? Currently I am installing a GenTL producer inside the container and using that CTI file. When trying to find a camera I can't seem to have it in my device info list. Not sure if this is a docker or harvesters issue but curious if someone here has already gotten data acquisition from inside a container. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/genicam/harvesters/issues/379, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK2RGIQNTPUWBO6DT7UEHLWI2I6VANCNFSM6AAAAAASDY5P5U . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Jonathan Cormier Software Engineer

Voice: 315.425.4045 x222

http://www.CriticalLink.com http://www.criticallink.com/ 6712 Brooklawn Parkway, Syracuse, NY 13211

https://www.linkedin.com/company/critical-link-llc https://twitter.com/Critical_Link

BaileyHelfer commented 1 year ago

I am trying to connect to a GigE Ethernet camera. I have my network configured properly to view the camera but Docker has its own network and have been trying to figure it out with that.

jcormier commented 1 year ago

Ahh that may be easier then. The gige discovery protocol relies on broadcast messages if I understand correctly. The default network setup for docker will probably block broadcast messages. You may have some luck setting up docker network using a host connection instead. https://docs.docker.com/network/host/

On Fri, Nov 18, 2022 at 10:11 AM Bailey @.***> wrote:

I am trying to connect to a GigE Ethernet camera. I have my network configured properly to view the camera but Docker has its own network and have been trying to figure it out with that.

— Reply to this email directly, view it on GitHub https://github.com/genicam/harvesters/issues/379#issuecomment-1320156237, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK2RGOXULBLLWN4GXNVYV3WI6MC5ANCNFSM6AAAAAASDY5P5U . You are receiving this because you commented.Message ID: @.***>

-- Jonathan Cormier Software Engineer

Voice: 315.425.4045 x222

http://www.CriticalLink.com http://www.criticallink.com/ 6712 Brooklawn Parkway, Syracuse, NY 13211

https://www.linkedin.com/company/critical-link-llc https://twitter.com/Critical_Link

BaileyHelfer commented 1 year ago

Ahh that may be easier then. The gige discovery protocol relies on broadcast messages if I understand correctly. The default network setup for docker will probably block broadcast messages. You may have some luck setting up docker network using a host connection instead. https://docs.docker.com/network/host/ On Fri, Nov 18, 2022 at 10:11 AM Bailey @.> wrote: I am trying to connect to a GigE Ethernet camera. I have my network configured properly to view the camera but Docker has its own network and have been trying to figure it out with that. — Reply to this email directly, view it on GitHub <#379 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABK2RGOXULBLLWN4GXNVYV3WI6MC5ANCNFSM6AAAAAASDY5P5U . You are receiving this because you commented.Message ID: @.> -- Jonathan Cormier Software Engineer Voice: 315.425.4045 x222 http://www.CriticalLink.com http://www.criticallink.com/ 6712 Brooklawn Parkway, Syracuse, NY 13211 https://www.linkedin.com/company/critical-link-llc https://twitter.com/Critical_Link

Thank you for the reply. I seen this link before and it states that the Host Driver is only available for Linux host and sadly I am using windows 10.

jcormier commented 1 year ago

Oh well, your really making things complicated then. I'm pretty sure docker on Windows runs inside a VM, which adds another layer of things that might trip you up. Good luck

BaileyHelfer commented 1 year ago

Yea, I know there has to be a way to do it but everything I'm seeing online is pretty much saying that on Windows it is very difficult. I think I'm just going to continue with Linux in the mean time.

MathijsNL commented 1 year ago

You can run docker in WSL2 without needing to install anything on Windows.

Only requirement is an up to date Windows 10. https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers

OsamaAlAhmadieh commented 6 months ago

I am currently running WSL2 in windows. I created a docker container, also running with the --netwrok=host option. I am still however getting the device_list_info empty. I am able to ping the camera using simply the ping command. Any idea what still might be wrong?

MathijsNL commented 6 months ago

It probably is a discovery issue. Especially since you can ping it. Maybe it will work if you change the network settings for WSL

image