<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NCS2 in docker container on RPI results in RuntimeError: Can not init Myriad device: NC_ERROR in Intel® Distribution of OpenVINO™ Toolkit</title>
    <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1189847#M19620</link>
    <description>&lt;P&gt;I have been using two test platforms: RPI3B+ running Ubuntu 20.04LTS and a RPI4B running Raspbian.&amp;nbsp; Both exhibit exactly the same problem.&lt;/P&gt;
&lt;P&gt;I have a simple test program that runs OK on the RPI hosts but fails when run in a docker container (built FROM ubuntu:bionic):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;E: [ncAPI] [     85611] [python3] ncDeviceOpen:1003     Failed to find booted device after boot
Traceback (most recent call last):
  File "debug.py", line 34, in &amp;lt;module&amp;gt;
    sys.exit(main() or 0)
  File "debug.py", line 30, in main
    exec_net = ie.load_network(network=net, device_name=device)
  File "ie_api.pyx", line 178, in openvino.inference_engine.ie_api.IECore.load_network
  File "ie_api.pyx", line 187, in openvino.inference_engine.ie_api.IECore.load_network
RuntimeError: Can not init Myriad device: NC_ERROR
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lsusb output on the host is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 033: ID 03e7:2485 Intel Movidius MyriadX
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the container running on that host the lsusb output shows the device but not the associated name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 033: ID 03e7:2485
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;The container was adapted from the&amp;nbsp;openvino instructions&amp;nbsp; for building docker images.&amp;nbsp; I saw the error when running using the suggested:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;docker run --privileged -v /dev:/dev --network=host openvino-debug&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I tried solution 2 in the instructions and built a libusb without UDEV support but also had the same problem.&amp;nbsp; When it crashes I was also no longer able to run the test program on the host - it would also terminate with the same error.&lt;/P&gt;
&lt;P&gt;I noticed that despite following the instructions, the libmyriadPlugin.so was still dependent upon the shared library pointed to by /lib/arm-linux-gnueabihf/libusb-1.0.so.0 (as was lsusb).&amp;nbsp; [I also had to run libtoolize before the bootstrap.sh execution otherwise it would fail.&amp;nbsp; I wonder if those instructions are correct for all linux variants?]&lt;/P&gt;
&lt;P&gt;I changed that link to point to the libusb built and installed into /usr/local/lib.&amp;nbsp; Now I still get the same error but if I run the test program on the host it still succeeds.&amp;nbsp; So at least it isn't crashing the NCS2 but I am unable to run in the container and don't know what to do to fix it.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jul 2020 11:58:26 GMT</pubDate>
    <dc:creator>Hawkes__Rycharde</dc:creator>
    <dc:date>2020-07-06T11:58:26Z</dc:date>
    <item>
      <title>NCS2 in docker container on RPI results in RuntimeError: Can not init Myriad device: NC_ERROR</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1189847#M19620</link>
      <description>&lt;P&gt;I have been using two test platforms: RPI3B+ running Ubuntu 20.04LTS and a RPI4B running Raspbian.&amp;nbsp; Both exhibit exactly the same problem.&lt;/P&gt;
&lt;P&gt;I have a simple test program that runs OK on the RPI hosts but fails when run in a docker container (built FROM ubuntu:bionic):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;E: [ncAPI] [     85611] [python3] ncDeviceOpen:1003     Failed to find booted device after boot
Traceback (most recent call last):
  File "debug.py", line 34, in &amp;lt;module&amp;gt;
    sys.exit(main() or 0)
  File "debug.py", line 30, in main
    exec_net = ie.load_network(network=net, device_name=device)
  File "ie_api.pyx", line 178, in openvino.inference_engine.ie_api.IECore.load_network
  File "ie_api.pyx", line 187, in openvino.inference_engine.ie_api.IECore.load_network
RuntimeError: Can not init Myriad device: NC_ERROR
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;lsusb output on the host is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 033: ID 03e7:2485 Intel Movidius MyriadX
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the container running on that host the lsusb output shows the device but not the associated name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 033: ID 03e7:2485
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;The container was adapted from the&amp;nbsp;openvino instructions&amp;nbsp; for building docker images.&amp;nbsp; I saw the error when running using the suggested:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;docker run --privileged -v /dev:/dev --network=host openvino-debug&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I tried solution 2 in the instructions and built a libusb without UDEV support but also had the same problem.&amp;nbsp; When it crashes I was also no longer able to run the test program on the host - it would also terminate with the same error.&lt;/P&gt;
&lt;P&gt;I noticed that despite following the instructions, the libmyriadPlugin.so was still dependent upon the shared library pointed to by /lib/arm-linux-gnueabihf/libusb-1.0.so.0 (as was lsusb).&amp;nbsp; [I also had to run libtoolize before the bootstrap.sh execution otherwise it would fail.&amp;nbsp; I wonder if those instructions are correct for all linux variants?]&lt;/P&gt;
&lt;P&gt;I changed that link to point to the libusb built and installed into /usr/local/lib.&amp;nbsp; Now I still get the same error but if I run the test program on the host it still succeeds.&amp;nbsp; So at least it isn't crashing the NCS2 but I am unable to run in the container and don't know what to do to fix it.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 11:58:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1189847#M19620</guid>
      <dc:creator>Hawkes__Rycharde</dc:creator>
      <dc:date>2020-07-06T11:58:26Z</dc:date>
    </item>
    <item>
      <title>Re:NCS2 in docker container on RPI results in Runt...</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190042#M19642</link>
      <description>&lt;P&gt;Hi Hawkes__Rycharde,&lt;/P&gt;&lt;P&gt;Thanks for reaching out. Could you please answer the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Which OpenVINO™ toolkit version are you using?&lt;/LI&gt;&lt;LI&gt;Have you tried with a docker image in a Linux machine, or just with Rpi?&lt;/LI&gt;&lt;LI&gt;Could you share the sample program you are using for us to reproduce your issue on our end?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;David C.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Jul 2020 23:55:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190042#M19642</guid>
      <dc:creator>David_C_Intel</dc:creator>
      <dc:date>2020-07-06T23:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Re:NCS2 in docker container on RPI results in Runt...</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190163#M19660</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;
&lt;P&gt;I'm using 2020.03.220 (downloaded as l_openvino_toolkit_runtime_raspbian_p_2020.3.220.tgz).&amp;nbsp; No, I haven't tried the docker images on anything other than those RPIs.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The test program uses the face-detection-adas-0001 model:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import sys
import os
import logging as log
from openvino.inference_engine import IENetwork, IECore

def main():
    log.basicConfig(format="[ %(levelname)s ] %(message)s", level=log.INFO, stream=sys.stdout)

    device = "MYRIAD"
    model_xml = "face-detection-adas-0001.xml"
    model_bin = os.path.splitext(model_xml)[0] + ".bin"
    ie = IECore()
    net = ie.read_network(model=model_xml, weights=model_bin)

    log.info("Loading Inference Engine")
    log.info("Device info:")
    versions = ie.get_versions(device)
    log.info("{}MKLDNNPlugin version ......... {}.{}".format(" "*8, versions[device].major, versions[device].minor))
    log.info("{}Build ........... {}".format(" "*8, versions[device].build_number))

    input_blob = next(iter(net.inputs))
    n, c, h, w = net.inputs[input_blob].shape
    log.info("inputs {}, {}, {}, {}".format(n, c, h, w))

    out_blob = next(iter(net.outputs))

    log.info("Loading model to the device")
    exec_net = ie.load_network(network=net, device_name=device)


if __name__ == '__main__':
    sys.exit(main() or 0)
&lt;/LI-CODE&gt;
&lt;P&gt;Obviously, it fails on the load_network() call.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Rych&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 08:23:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190163#M19660</guid>
      <dc:creator>Hawkes__Rycharde</dc:creator>
      <dc:date>2020-07-07T08:23:27Z</dc:date>
    </item>
    <item>
      <title>Re:NCS2 in docker container on RPI results in Runt...</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190337#M19679</link>
      <description>&lt;P&gt;Hi Hawkes__Rycharde,&lt;/P&gt;&lt;P&gt;Thanks for the information provided. We tested a docker image in a Raspberry Pi 4B with Raspbian GNU/Linux 10 (buster)  and it worked successfully. Also, the lsusb command showed the same output on both host and container.  &lt;/P&gt;&lt;P&gt;Try to follow this &lt;A href="https://www.intel.com/content/www/us/en/support/articles/000055220/boards-and-kits.html" target="_blank"&gt;guide&lt;/A&gt; and tell us if the issue persists.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;David C.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Jul 2020 17:33:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190337#M19679</guid>
      <dc:creator>David_C_Intel</dc:creator>
      <dc:date>2020-07-07T17:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Re:NCS2 in docker container on RPI results in Runt...</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190977#M19719</link>
      <description>&lt;P&gt;Unfortunately, those instructions didn't yield a working image either.&amp;nbsp; &amp;nbsp;The example dockerfile has a typo and the test images can't be fetched as required because they are hidden by a captcha, but fixing those issues still yields an image that exhibits the same problem using the two test applications.&lt;/P&gt;
&lt;P&gt;In the container, lsusb gives:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 009: ID 03e7:2485 Intel Movidius MyriadX
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So that's promising, but, for example, running openvino_fd_myriad.py results in:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;E: [ncAPI] [    260210] [python3] ncDeviceOpen:844      Failed connection to device (1.1.3-ma2480) with error 7
Traceback (most recent call last):
  File "openvino_fd_myriad.py", line 9, in &amp;lt;module&amp;gt;
    out = net.forward()
cv2.error: OpenCV(4.1.1-openvino) /home/jenkins/workspace/OpenCV/OpenVINO/build/opencv/modules/dnn/src/op_inf_engine.cpp:477: error: (-215:Assertion failed) Failed to initialize Inference Engine backend: Can not init Myriad device: NC_ERROR in function 'initPlugin'
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;lsusb after the crash shows:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 010: ID 03e7:f63b Intel
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the details for the NCS2 are now truncated.&amp;nbsp;&amp;nbsp;After this I can't even run on the host without the same error.&amp;nbsp; [If I run the container using --device /dev/bus:/dev/bus rather than -v /dev:/dev --privileged, then I get the same error but I can still run apps successfully on the host after failure in the container.]&lt;/P&gt;
&lt;P&gt;I am using a fully up-to-date&amp;nbsp;&lt;SPAN&gt;Raspberry Pi 4B with Raspbian GNU/Linux 10 (buster).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Have you built and run the image in the guide you sent me?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:04:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1190977#M19719</guid>
      <dc:creator>Hawkes__Rycharde</dc:creator>
      <dc:date>2020-07-09T11:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: NCS2 in docker container on RPI results in RuntimeError: Can not init Myriad device: NC_ERROR</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1191054#M19726</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;Hawkes__Rycharde,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your reply. Please try using the Dockerfile attached (which is using the latest OpenVINO™ toolkit version and the 2019.R3&amp;nbsp;face-detection-adas-0001 IR files). Follow the instructions from the &lt;A href="https://www.intel.com/content/www/us/en/support/articles/000055220/boards-and-kits.html" rel="nofollow noopener noreferrer" target="_blank"&gt;guide&lt;/A&gt; provided and remember the path to the build directory for this installation is now:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/opt/intel/openvino/deployment_tools/inference_engine/samples/cpp/build&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We tested it on a Raspberry Pi 4B with Raspbian GNU/Linux 10 (buster) and it worked. Let us know if&amp;nbsp; you have any issues during the installation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;David C.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 18:28:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1191054#M19726</guid>
      <dc:creator>David_C_Intel</dc:creator>
      <dc:date>2020-07-09T18:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: NCS2 in docker container on RPI results in RuntimeError: Can not init Myriad device: NC_ERROR</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1191905#M19803</link>
      <description>&lt;P&gt;This worked first time, thanks!&amp;nbsp; I have also gone back and managed to create working images based on ubuntu:bionic.&amp;nbsp; I then went on to try and incorporate the udev workaround described &lt;A href="https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_docker_linux.html" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp; That did not work because, for whatever reason, the library /lib/arm-linux-gnueabihf/libusb-1.0.so.0 does not link to the newly compiled library with udev disabled.&amp;nbsp; If you fix that by:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ln -fs /usr/local/lib/libusb-1.0.so.0.1.0 /lib/arm-linux-gnueabihf/libusb-1.0.so.0
&lt;/LI-CODE&gt;
&lt;P&gt;Then you can start the container with a cgroup rule to avoid using --privileged as the instructions suggested:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;docker run -it --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb &amp;lt;image_name&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Works fine, even if you remove and reinsert the stick.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 11:37:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/NCS2-in-docker-container-on-RPI-results-in-RuntimeError-Can-not/m-p/1191905#M19803</guid>
      <dc:creator>Hawkes__Rycharde</dc:creator>
      <dc:date>2020-07-13T11:37:45Z</dc:date>
    </item>
  </channel>
</rss>

