ros-realtime / ros-realtime-rpi4-image

An image for the Raspberry Pi 4 with ROS 2 and Linux RT preinstalled
Apache License 2.0
224 stars 41 forks source link

use a better compression #57

Open razr opened 2 years ago

razr commented 2 years ago

I see that the image is compressed by the pigz from the original 3.9G to 1.5G, however it looks like that @carlossvg produces a release using xz compression which is only 932 MB

Before compression:
total 3.9G
-rw-r--r-- 1 runner docker 4.0G Sep 27 13:43 ubuntu-22.04.1-rt-ros2-arm64+raspi.img
+ cd out
+ echo 'After compression:'
+ pigz ubuntu-22.04.1-rt-ros2-arm64+raspi.img
After compression:
+ ls -lh .
total 1.5G
shuhaowu commented 2 years ago

Is that in CI? When I updated the release instructions, I opted to use xz as it produces a smaller image: https://github.com/ros-realtime/ros-realtime-rpi4-image/blob/master/docs/ReleaseImage.md

razr commented 2 years ago

yes, it is in the GitHub workflow. I have built jammy https://github.com/razr/ros-realtime-rpi4-image/actions/runs/3135956272/jobs/5092263112 Right, if it would be nice to use xz, we can create an artifact and download it then.

shuhaowu commented 2 years ago

Ah good point. We can switch the CI to using xz, but we also need to switch it to manual activation if that's the case (instead of automatically running on master push), because my experience running xz is that it is very slow and may consume a large amount of free CI time Github gives out for a particular account.

These should be simple changes but I don't have time to do that right now. Do you have time to create a PR and we can merge it?

razr commented 2 years ago

I agree, I'm also using workflow_dispatch for the manual start in my other projects. I believe @LanderU wants to provide a patch.

carlossvg commented 2 years ago

Separate workflow in 2 steps: