Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for armv7l? #2

Closed
robbiet480 opened this issue Jun 2, 2020 · 5 comments
Closed

Support for armv7l? #2

robbiet480 opened this issue Jun 2, 2020 · 5 comments

Comments

@robbiet480
Copy link
Contributor

Any chance support for armv7l can be added? Would provide a faster way to get going on Raspberry Pi.

@robotastic
Copy link
Owner

robotastic commented Jun 2, 2020 via email

@robbiet480
Copy link
Contributor Author

I looked into this a bit today and seems the easiest way to go about this would be to use docker buildx. Gonna do some tests locally and see how hard it is to get this and then trunk-recorder building.

@robbiet480
Copy link
Contributor Author

This was easier than I thought it would be! Took less than 30 minutes to have complete builds uploaded to Docker Hub. Here's all the commands I had to run locally on my Mac to get builds going:

  1. Enable experimental mode on Docker Desktop for Mac: Docker menu bar item > Preferences > Command Line and then turn on the Enable experimental features toggle. Click Apply & Restart.
  2. docker buildx create --name testbuilder
  3. docker buildx use testbuilder
  4. docker buildx inspect --bootstrap (the bootstrap is the key, it'll create the VMs used for builds)
  5. docker login if you aren't already
  6. docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t robotastic/docker-gnuradio --push .
  7. The build took 791.4s and get automatically uploaded to Docker Hub. You can view mine here.

Figured it out thanks to docker buildx docs and this article that shows exactly how to build for rPi.

@robbiet480
Copy link
Contributor Author

robbiet480 commented Jun 5, 2020

As for trunk-recorder, it took a lot longer to build: 75 minutes! Weirdly, building armv7 took almost 20 minutes less than building for arm64 (amd64 only took 200 seconds). I don't think its the limits of my machine either, i'm on a brand new fully loaded 16" MacBook Pro. It's extremely likely there's cross compile flags that could be set to speed up the time. Thankfully, I didn't have to make changes there either, just ran docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t robotastic/trunk-recorder --push .. I'd suggest running that as part of a Travis or other CI run since Docker Hub builds don't yet support buildx. More info on that at docker/hub-feedback#1874

You can view mine here.

@robbiet480
Copy link
Contributor Author

Continuing this at robotastic/trunk-recorder#365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants