Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Commit

Permalink
update raspberry pi install instructions (apache#14172)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmarkham authored and Gordon Reid committed Feb 28, 2019
1 parent c81ac9a commit 91891d9
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 7 deletions.
50 changes: 45 additions & 5 deletions docs/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1188,14 +1188,17 @@ MXNet should work on any cloud provider's CPU-only instances. Follow the Python
<div class="devices">
<div class="raspberry-pi">

MXNet supports the Debian based Raspbian ARM based operating system so you can run MXNet on Raspberry Pi Devices.
MXNet supports the Debian based Raspbian ARM based operating system so you can run MXNet on Raspberry Pi 3B devices.

These instructions will walk through how to build MXNet for the Raspberry Pi and install the Python bindings for the library.

You can do a dockerized cross compilation build on your local machine or a native build on-device.

The complete MXNet library and its requirements can take almost 200MB of RAM, and loading large models with the library can take over 1GB of RAM. Because of this, we recommend running MXNet on the Raspberry Pi 3 or an equivalent device that has more than 1 GB of RAM and a Secure Digital (SD) card that has at least 4 GB of free memory.

## Quick installation
You can use this [pre-built Python wheel](wget https://mxnet-public.s3.amazonaws.com/install/raspbian/mxnet-1.5.0-py2.py3-none-any.whl) on a Raspberry Pi 3B with Stretch. You will likely need to install several dependencies to get MXNet to work. Refer to the following **Build** section for details.

**Cross compilation build (Experimental)**

## Docker installation
Expand All @@ -1222,11 +1225,48 @@ ci/build.py -p armv7

## Install

Create a virtualenv and install the package we created previously.
Your Pi will need several dependencies.

Install MXNet dependencies with the following:
```
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
build-essential \
ca-certificates \
cmake \
curl \
git \
libatlas-base-dev \
libcurl4-openssl-dev \
libjemalloc-dev \
liblapack-dev \
libopenblas-dev \
libopencv-dev \
libzmq3-dev \
ninja-build \
python-dev \
software-properties-common \
sudo \
unzip \
virtualenv \
wget
```
Install virtualenv with:
```
sudo pip install virtualenv
```
Create a Python 2.7 environment for MXNet with:
```
virtualenv -p `which python` mxnet_py27
```
You may use Python 3, however the [wine bottle detection example](https://mxnet.incubator.apache.org/versions/master/tutorials/embedded/wine_detector.html) for the Pi with camera requires Python 2.7.

Create a virtualenv and install the wheel we created previously, or the wheel that you downloaded.

```
virtualenv -p `which python3` mxnet_py3
source mxnet_py3/bin/activate
virtualenv -p `which python3` mxnet_py27
source mxnet_py27/bin/activate
pip install mxnet-x.x.x-py2.py3-none-any.whl
```

Expand Down Expand Up @@ -1257,7 +1297,7 @@ Install these dependencies using the following commands in any directory:

```
sudo apt-get update
sudo apt-get -y install git cmake ninja-build build-essential g++-4.9 c++-4.9 liblapack* libblas* libopencv* libopenblas* python3-dev virtualenv
sudo apt-get -y install git cmake ninja-build build-essential g++-4.9 c++-4.9 liblapack* libblas* libopencv* libopenblas* python3-dev python-dev virtualenv
```

Clone the MXNet source code repository using the following `git` command in your home directory:
Expand Down
4 changes: 2 additions & 2 deletions docs/install/raspbian_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

<!-- This page should be deleted after sometime (Allowing search engines
to update links) -->
<meta http-equiv="refresh" content="3; url=http://mxnet.io/install/index.html" />
<meta http-equiv="refresh" content="3; url=https://mxnet.incubator.apache.org/versions/master/install/index.html?platform=Devices&language=Python&processor=CPU" />
<!-- Just in case redirection does not work -->
<p>
<a href="http://mxnet.io/install/index.html">
<a href="https://mxnet.incubator.apache.org/versions/master/install/index.html?platform=Devices&language=Python&processor=CPU">
This content is moved to a new MXNet install page. Redirecting... </a>
</p>

0 comments on commit 91891d9

Please sign in to comment.