frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

docker container on raspberry pi

Has anyone managed to successfully build a docker container on raspberry pi from the Dockerfile that's shipped with ncsdk2?

I get the error below:

Installing collected packages: numpy
  Found existing installation: numpy 1.11.0
    Not uninstalling numpy at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed numpy-1.13.3
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Checking whether tensorflow CPU version is installed...
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Checking whether tensorflow GPU version is installed...
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Couldn't find a supported tensorflow version, installing tensorflow 1.6.0
Collecting tensorflow==1.6.0
  Could not find a version that satisfies the requirement tensorflow==1.6.0 (from versions: )
No matching distribution found for tensorflow==1.6.0
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Installation failed: Command ' pip3 install  --trusted-host files.pythonhosted.org tensorflow==1.6.0' return code=1. Error on
line 308 in ./install-utilities.sh.  Will exit
Makefile:47: recipe for target 'install' failed
make: *** [install] Error 131
The command '/bin/sh -c make install' returned a non-zero code: 2

Comments

  • 4 Comments sorted by Votes Date Added
  • My guess is that because dockerfile pulls from ubuntu image the OS_DISTRO variables in the installer script is wrongly set to ubuntu instead of raspian and it follows the wrong path.
    Maybe a simple FROM resin/rpi-raspbian instead of from ubuntu:16.04 would do the trick? I'll give that a go and report back

  • So by using FROM resin/rpi-raspbian:stretch the build proceeds but eventually fails:

    Collecting numpy==1.13.1
      Downloading https://files.pythonhosted.org/packages/c0/3a/40967d9f5675fbb097ffec170f59c2ba19fc96373e73ad47c2cae9a30aed/numpy-1.13.1.zip (5.0MB)
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
        ImportError: No module named setuptools
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3Jc26M/numpy/
    Installation failed: Command ' pip2 install  --trusted-host files.pythonhosted.org --upgrade numpy==1.13.1' return code=1. Error on line 308 in ./install-utilities.sh.  Will exit
    Makefile:47: recipe for target 'install' failed
    make: *** [install] Error 131
    The command '/bin/sh -c make install' returned a non-zero code: 2
    

    I'd be great if movidius had proper prebuilt x86_64 and raspberry pi docker images up on DockerHub. Perhaps with various tags so I could get caffe or tf versions,

  • edited May 17 Vote Up0Vote Down

    Ok so I did eventually manage to build a docker image on rpi with the patch below. Basically you need to pull from resin/rpi-raspbian:stretch instead of ubuntu and add python3-setuptools and python-setuptools to requirements_apt_raspbian.txt .

    (I have disabled caffe because I have no interest in it. Not sure if it builds with caffe enabled or not.)

    diff --git a/extras/docker/Dockerfile b/extras/docker/Dockerfile
    index e65eadf..0ef9386 100644
    --- a/extras/docker/Dockerfile
    +++ b/extras/docker/Dockerfile
    @@ -1,4 +1,5 @@
    -FROM ubuntu:16.04
    +# FROM ubuntu:16.04
    +FROM resin/rpi-raspbian:stretch
    
     # Install necessary packages for the installer
     RUN apt-get update && apt-get install -y \
    diff --git a/ncsdk.conf b/ncsdk.conf
    index c5b7aed..4f97f9b 100644
    --- a/ncsdk.conf
    +++ b/ncsdk.conf
    @@ -1,5 +1,5 @@
     INSTALL_DIR=/opt/movidius
    -INSTALL_CAFFE=yes
    +INSTALL_CAFFE=no
     CAFFE_FLAVOR=ssd
     CAFFE_USE_CUDA=no
     INSTALL_TENSORFLOW=yes
    diff --git a/requirements_apt_raspbian.txt b/requirements_apt_raspbian.txt
    index fa541da..1f024b9 100644
    --- a/requirements_apt_raspbian.txt
    +++ b/requirements_apt_raspbian.txt
    @@ -1,2 +1,2 @@
    -python3-markdown python3-h5py python3-lxml python3-matplotlib python3-protobuf python3-dateutil python3-scipy python3-six python3-networkx make wget python3-dev python3-pip python-pip
    +python3-markdown python3-h5py python3-lxml python3-matplotlib python3-protobuf python3-dateutil python3-scipy python3-six python3-networkx make wget python3-dev python3-pip python-pip python3-setuptools python-setuptools
    
  • @milad Glad this is working for you, thanks for sharing!

Sign In or Register to comment.