Ax: Installing Ax on a Raspberry Pi (Model 3B+)

Created on 22 Oct 2020  路  4Comments  路  Source: facebook/Ax

Does anyone have experience with installing Ax on a Raspberry Pi, im my case the model is 3B+. I run Raspberry Pi OS 32bit and I also have one with the 64bit beta version. I'd like to install the Ax dependencies manually, but it's difficult to find the matching pre-compiled packages for the arm64 or arm7l architecture. Any help or hints (is this even possible?) would be very much appreciated!

Thanks
Nicolas

enhancement wishlist

Most helpful comment

Hey Nicolas, this sounds super exciting! Admittedly I've been getting hyped up about ARM recently and it's great to hear Ax is finding its way onto Raspberry Pis. Unfortunately, I don't think we've tried to build and run Ax & Botorch on ARM yet, but if you are able to get it to work, we'd love to head about it (and are open to PRs). Here are some rough notes that might help:

  • Most of the common dependencies like scipy and pandas appear to have existing builds for aarch64 that you might be able to just install via pip or download those builds and install.
  • Some like gpytorch and scikit-learn may not have pre-built aarch64 binaries, but it should be possible to manually build these (e.g. https://github.com/scikit-learn/scikit-learn/issues/17800)
  • Pytorch also appears to support arm64 builds (https://mathinf.eu/pytorch/arm64/)
  • Both Ax and Botorch also have wheels builds which should work on any architecture (though haven't been tested on arm).

fwiw, it seemed like 32-bit ARM support is shaky, with Pytorch issues like https://github.com/pytorch/pytorch/issues/27040, so arm64 might be your best bet.

All 4 comments

Hey Nicolas, this sounds super exciting! Admittedly I've been getting hyped up about ARM recently and it's great to hear Ax is finding its way onto Raspberry Pis. Unfortunately, I don't think we've tried to build and run Ax & Botorch on ARM yet, but if you are able to get it to work, we'd love to head about it (and are open to PRs). Here are some rough notes that might help:

  • Most of the common dependencies like scipy and pandas appear to have existing builds for aarch64 that you might be able to just install via pip or download those builds and install.
  • Some like gpytorch and scikit-learn may not have pre-built aarch64 binaries, but it should be possible to manually build these (e.g. https://github.com/scikit-learn/scikit-learn/issues/17800)
  • Pytorch also appears to support arm64 builds (https://mathinf.eu/pytorch/arm64/)
  • Both Ax and Botorch also have wheels builds which should work on any architecture (though haven't been tested on arm).

fwiw, it seemed like 32-bit ARM support is shaky, with Pytorch issues like https://github.com/pytorch/pytorch/issues/27040, so arm64 might be your best bet.

Note that scikit-learn has a conda package for aarch64, in case you can use conda: https://anaconda.org/conda-forge/scikit-learn

Unfortunately no ARM-compatible pytorch conda package yet though...

Thanks for your replies. I suspected that 32-bit would be a problem, so I tried the Raspberry Pi OS 64bit (beta):

https://www.raspberrypi.org/forums/viewtopic.php?t=275370

I also found the ARM64 build for PyTorch that @stevemandala refered to and successfully installed it on a model 3B+. That worked fine. I stopped when bulding scikit-learn didn't finish through the night and instead I ran into a bunch of errors. I read somewhere that this is a difficult task, especially if you don't know exactly what you're doing (I am not a linux expert).

The reason I wanted Ax on RPis is simple: In a project we are building a research platform to automate the execution of experiments with Ax. For this, we need a number of compute instances that carry out the experiments on demand. As we have many RPis at the university, I thought why not give it a spin. I now switched to Google compute VMs for that, which works perfectly fine.

That said - IF you should ever find a working solution for Ax on a Raspberry Pi I would be super interested to hear about it and try it myself!

Nicolas

We will now be tracking wishlist items / feature requests in a master issue for improved visibility: #566. Of course please feel free to still open new feature requests issues; we'll take care of thinking them through and adding them to the master issue.

Was this page helpful?
0 / 5 - 0 ratings