Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4909

Automation, sensing and robotics • Re: Docker Build With Low RAM Causing OOM Raspberry Pi 4B

$
0
0
Device: Raspberry Pi 4B (linux/arm64/v8)
OS: Ubuntu 20.04 LTS - 4GB RAM & 64 GB SD card

TLDR
  • What can I do to build the image on my Pi without OOM?
  • Can I emulate a build from one of my AMD devices to build as ARM architecture for the Pi 4B to pull from DockerHub?
I want to build this docker image https://github.com/HKUST-Aerial-Roboti ... ockerfile for my autonomous drone project https://github.com/MichaelThamm/autonomous-drone and run it which is most efficient within the Pi itself but given the limited RAM on my Pi I get OOM half way through. I then tried to build the docker image on my stronger devices to push and pull from DockerHub to my Pi but these devices are AMD architecture so it didn't work. However, the build completed and took 12GB of RAM at peak meaning my Pi 4B can not manage this build.

What I tried:

Code:

nice -10 docker build DH_USER/autonomous-drone:vins-fusion .
I still get OOM due to RAM usage.

Code:

docker buildx build --platform linux/arm64 -t DH_USER/autonomous-drone:vins-fusion .
at around 41% complete, I get a c++: internal compiler error: Killed (program cc1plus)
Can you just increase swap?

Statistics: Posted by ejolson — Tue Mar 05, 2024 5:30 am



Viewing all articles
Browse latest Browse all 4909

Trending Articles