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

Automate building and running base image on RPi with Docker CLI #80

Closed
hhenry01 opened this issue Jan 28, 2023 · 5 comments · Fixed by #94
Closed

Automate building and running base image on RPi with Docker CLI #80

hhenry01 opened this issue Jan 28, 2023 · 5 comments · Fixed by #94
Assignees
Labels
infrastructure sim Boat Simulator team

Comments

@hhenry01
Copy link
Member

Purpose

Our RPi needs to operate without a GUI, and just needs to run our software. Dedicated scripting to build and run will make the process a lot faster.

Changes

New script(s) to build the container, run it, and also execute a list of programs when given the paths/commands (a default to run all software should also be defined).

Resources

@hhenry01 hhenry01 self-assigned this Jan 28, 2023
@github-project-automation github-project-automation bot moved this to Backlog in SOFT Project Jan 28, 2023
@patrick-5546 patrick-5546 added sim Boat Simulator team and removed infrastructure labels Feb 11, 2023
@patrick-5546
Copy link
Member

patrick-5546 commented Feb 11, 2023

Adapted from #79 (comment)

Another solution to evaluate against building on RPi is to build in CI:

  • Add workflow to push built image: clones repos and builds them
    • From base image
    • Runs on push to main and pull request
    • Tag is commit hash
      • Can also use latest tag to quickly test changes that you make

Upside is that you don't have to build or develop on RPi. Downside is that it may take a couple minutes for the images to be built and pushed.

If we build on the RPi, we can clone sailbot_workspace locally and make it a volume when running the base image, effectively making our own dev container

@patrick-5546 patrick-5546 moved this from Backlog to Todo in SOFT Project Feb 11, 2023
@patrick-5546
Copy link
Member

  • Setup Docker on Rpi
  • See how long it takes to build compared to x86 laptop
  • Decide on path forwards: build locally, CI, or on x86 laptop?

@patrick-5546
Copy link
Member

patrick-5546 commented Feb 13, 2023

Build Times

Ran setup, clean, and build tasks with network_systems, py_pubsub_ex, and cpp_pubsub_ex,

Computer Build Time CPU Memory Architecture OS Other Notes
XPS 15 30s i7-12700H 32 GB x86 Windows
Lenovo C940 50s i7-1065G7 16 GB x86 Windows
Lenovo C940 50s i7-1065G7 16 GB x86 Ubuntu Used Docker Desktop which runs in a VM, Docker Engine may be faster
Gigabyte G5 MD 30s i5-11400H 16GB x86 Pop OS
Macbook Pro 14 30s M1 Pro 16 GB arm MacOS
Macbook Air 120s M1 8 GB arm MacOS Memory was bottleneck: even before running docker memory was full, peaked at 11GB swap

@patrick-5546
Copy link
Member

@hhenry01 do you have docker engine or desktop installed on popos? Can you add your build times?

@hhenry01
Copy link
Member Author

@hhenry01 do you have docker engine or desktop installed on popos? Can you add your build times?

Docker engine. Added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure sim Boat Simulator team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants