# No devices found by CVBPy in Docker (ARM64)

**URL:** https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488
**Category:** General Questions
**Created:** [September 6, 2021, 9:51am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488 "2021-09-06T09:51:08Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 9:51am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/1 "2021-09-06T09:51:08Z")

</div>

I finally managed to get `import cvb` working in my Python3.7 Docker environment. However, this code

```auto
FLAGS = cvb.DiscoverFlags.IgnoreGevSD | cvb.DiscoverFlags.IgnoreVins
discover = cvb.DeviceFactory.discover_from_root(FLAGS)
if len(discover) > 0:
    device = cvb.DeviceFactory.open(discover[0].access_token)
    # continue using the device

```

as found in [thread](https://forum.commonvisionblox.com/t/installing-cvb-in-docker/680) results in an empty `discover` list.

I can ping the camera from inside the container, and I run the container setting the CVB ENV variables as suggested [here](https://forum.commonvisionblox.com/t/no-module-named-cvb-bei-import-cvb/1016/2). What else can I try?

EDIT: Docker container in Nvidia Jetson Xavier, ARM64. Camera can be opened and closed using CVB GeniCam Browser on the host.

Kindest regards, Erik

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 10:00am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/2 "2021-09-06T10:00:18Z")

</div>

Another attempt:

```auto
ids = cvb.DeviceFactory.discover_from_root(cvb.DiscoverFlags.IgnoreVins)
camera = cvb.DeviceFactory.open(ids[0].access_token)

```

results in a lot of logging warnings and

```auto
File "<stdin>", line 1, in <module>
RuntimeError: failure open device

```

Any clues?

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 6, 2021, 10:04am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/3 "2021-09-06T10:04:00Z")

</div>

Is this a docker on Windows host?

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 10:05am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/4 "2021-09-06T10:05:32Z")

</div>

thanks for reaching out, sorry for not being more specific on host. This is a Docker container in a Nvidia Xavier host, that is ARM64 platform.

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 10:49am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/5 "2021-09-06T10:49:35Z")

</div>

More observations:

1. If I open the camera in the GeniCam Browser on the host, the `ids` list in the python script, run from inside the container, has length 0. After closing the camera in the browser, the list has length 1.

2. Running

```auto
vin_device = cvb.DeviceFactory.open(cvb.install_path() + "/drivers/GenICam.vin")

```

throws a

```auto
File "<stdin>", line 1, in <module>
RunTimeError: C-API call failed

```

1. I can run the " Image Processing and Pixel Access" example from the getting started guide, from inside the container.

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 6, 2021, 11:03am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/6 "2021-09-06T11:03:39Z")

</div>

Hi Erik,

thank you for the infos!

First of all, the flag `cvb.DiscoverFlags.IgnoreGevSD` will render the search for GEV devices pointless as you will only have the GevSD on unix systems. GevFD is only needed on Windows and thus only available there.

The second call you are doing looks good and should work:  
`ids = cvb.DeviceFactory.discover_from_root(cvb.DiscoverFlags.IgnoreVins)`  
Can you check the `len(ids)`? It should be excactly the count of cameras connected (probably 1?)

My next guess would be the network configuration or the camera configuration. Can you check with GenICam Browser on the host which IP is configured for the camera and maybe re-configure it for the used network for the host/container network? You find it by right-clicking the device and select “Assign IP”.

It is possible to discover a device but not get write access to it if it is not in the correct subnet.

Also please check if the connection is blocked by a firewall.

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 11:05am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/7 "2021-09-06T11:05:33Z")

</div>

I will try, thanks! I also just now edited the post above with observations. There I mention the `ids` list as you request.

I am in a local network, using `--network host` when running the container. The host has Ip 192.168.1.11, and the IP for the camera is set to 192.168.1.13.

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 6, 2021, 11:09am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/8 "2021-09-06T11:09:32Z")

</div>

Yes, thanks. So you get excactly 1 device which is good. Loading the GenICam.vin will only work if you configured the GenICam.ini file under $CVBDATA/driver or using the GenICam Browser. I would recommend doing the from\_root discovery without the vin as you already did and opening the device via access\_token. You can only open it if it is not already opened anywhere else. Default opening mode is exclusive afaik.

I am not sure which example you mean. Do you have a link?

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 11:12am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/9 "2021-09-06T11:12:04Z")

</div>

> I am not sure which example you mean. Do you have a link?

Sure! Scroll down in this [guide](https://forum.commonvisionblox.com/t/getting-started-with-cvbpy/241/9).

PS! I also updated above post with IP addresses.

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 6, 2021, 11:17am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/10 "2021-09-06T11:17:44Z")

</div>

Thanks,

sadly the example only loads an image, no device 😉 But then CVB is correctly installed.

Do you have a bridge on the same network for you container?  
Something like:

`docker network create --driver=bridge --subnet=192.168.1.15/24 --gateway=192.168.1.99 br0`

and connect the network to your container:

`docker network connect br0 cvb_container`

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 1:00pm UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/11 "2021-09-06T13:00:29Z")

</div>

I use `--network=host` in the run command. Otherwise no user-defined bridge.

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 6, 2021, 1:12pm UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/12 "2021-09-06T13:12:05Z")

</div>

And you have the correct subnet in the container? And no firewall that blocks?  
Did you try to run your script on the host and does it work?

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 1:37pm UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/13 "2021-09-06T13:37:56Z")

</div>

Sorry, I am not sure which subnet that is correct to use in container, which has internal IP 172.17.0.2. No firewalls as I can tell. Yes, the script works on the host.

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 6, 2021, 2:08pm UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/14 "2021-09-06T14:08:03Z")

</div>

The Docker engine uses a default bridge, allowing the containers to communicate outside, right? Otherwise I don’t know what to do.

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 7, 2021, 5:11am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/15 "2021-09-07T05:11:38Z")

</div>

Afaik docker sets up a network for communication but you need the camera in the same subnet to stream correctly. The `network=host` flag should configure all host subnets but I had bad experience with this. So maybe either

A) Add the 172.17.0.x network to your host (if not already added) and set the camera to it using the GCBrowser as well (e.g. 172.17.0.3)  
B) Use my above command to configure docker in your other subnet which seemingly is used by it and your host since streaming seems to work there.

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 7, 2021, 1:40pm UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/16 "2021-09-07T13:40:54Z")

</div>

@usernv thanks so much for helping out. Now I have tried creating a Docker network with its own subnet, no luck. Then I create a network on the host, with IP 172.17.0.2 and subnet mask 16. The Docker container itself has IP 172.17.0.1, subnet mask 16, or 255.255.0.0.

When I open GeniCam Browser, and assign camera IP to 172.17.0.3, subnet mask 255.255.0.0, I get “Please check if camera is in correct subnet”. Then the camera disappears from CVB Browser.

To make the camera reappear, I switch host back to the network where host is 192.168.1.11, and camera 192.168.1.13. The camera shows up and is working.

As I said earlier, the stream works just fine from the host. Can this be any clue?

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 8, 2021, 5:55am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/17 "2021-09-08T05:55:35Z")

</div>

The camera disappears from the GenICam Browser because you assign it out of the current network. That’s to be expected. The camera should be on 172.17.0.3 then. You can make it “reappear” by doing a subnet discovery (layered lenses top left in the GenICam Browser). The camera should be yellow then (found but not configured in the GenICam Browser’s subnet).  
If you have the camera configured to the host’s subnet and the routing to your container is set up correctly (and no firewall blocks the connection), you should be able to use the camera in the container.  
Sadly I can only tell you to check that the routing and IPs are correctly set up. Otherwise maybe try to contact our support team directly. They should be able to help:  
[de.support@stemmer-imaging.com](mailto:de.support@stemmer-imaging.com)

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 8, 2021, 6:46am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/18 "2021-09-08T06:46:16Z")

</div>

Thanks, I sincerely appreciate your effort. I have sent an email to support directly 🙂

---

<div class="post-metadata">

### Author: ![poirot](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@poirot](https://forum.commonvisionblox.com/u/poirot)
#### Post date: [September 8, 2021, 9:01am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/19 "2021-09-08T09:01:57Z")

</div>

@usernv just another observation. All our test cameras are previously assigned the IP address 192.168.1.13. When changing host network to 172.17.0.x/16, I can only `force IP` in CVB Browser `assign IP` menu. When the host network is 192.168.1.x/24, I can set persistent IP address e.g. 192.168.1.5.

EDIT: Also after change of network to 172.17.0.x/16, and reboot: When pressing “assign IP” the address values are already pre-filled with the original values 192.168.1.x etc. It seems the camera “does not accept” the change of host network, and I don’t understand why.

---

<div class="post-metadata">

### Author: ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)
#### Post date: [September 9, 2021, 8:37am UTC](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488/20 "2021-09-09T08:37:56Z")

</div>

Setting an IP out of the network the GenICam Browser is in results in a communication loss to the device, so the device cannot set the persitant IP afterwards.  
Without persistant IP, rebooting the device will load the default settings, which includes the last persistant IP setting. Don’t reboot the device for this test.

[Next page](https://forum.commonvisionblox.com/t/no-devices-found-by-cvbpy-in-docker-arm64/1488.md?page=2)
