Merged
Conversation
This speeds up both building and using the dev container by a lot on
Apple silicon, see benchmarks below:
`time docker build --no-cache -f .devcontainer/Dockerfile .`:
- before: 5:55.01
- after: 3:08.48 (-47%)
These are the steps that took the most time:
```
Before After
=> [stage-2 9/10] RUN ./install-system-packages.sh ... 58.6s 22.0s
=> [stage-2 10/10] RUN --mount=type=bind,target=/con ... 245.7s 119.4s
=> exporting to image ... 45.4s 44.3s
=> => exporting layers ... 30.8s 30.6s
=> => unpacking to ... 14.6s 13.7s
```
Unsurprisingly, the most time saved was from commands running
containerized. These run more than twice as fast. This is reflected
also when building apps inside the dev container:
```
rm -r target-aarch64/
time make build
```
- before: 0m20.285s
- after: 0m7.264s (-64%)
Specifying the platform and changing the working dir allows most checksums to be reproduced
This completes the revert of 5148b0
Collaborator
Author
|
Moving this back to draft because the And |
This avoids `cargo-acap-sdk: /lib/aarch64-linux-gnu/libc.so.6: version 'GLIBC_2.39' not found (required by cargo-acap-sdk)`. Curiously this does not happen with for instance `cargo-acap-build`. The best explanation I could find is that a glibc dependency gets baked into the pre-built standard library and this is varies between platforms.
Co-authored-by: Jovy <joeiphone08@gmail.com>
guoxe
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This speeds up both building and using the dev container by a lot on Apple silicon, see benchmarks below. Unfortunately, the checksums do not reproduce and developers would have to either wait for PRs to fail once in CI or run the image with
--platform linux/amd64.The major workflows
check_other,check_generated_files,check_generated_files_containerall work in the new dev container on an aarch64 host. What doesn't work is running some apps on in the container (as opposed to on device). These can run outside the container in most cases so in the unlikely event that it impacts anyone, there's a workaround available.Benchmarks
These ran on an Apple M4 Max.
time docker build --no-cache -f .devcontainer/Dockerfile .:These are the steps that took the most time:
Unsurprisingly, the most time saved was from commands running containerized. These run more than twice as fast. This is reflected also when building apps inside the dev container:
Details
.devcontainer/Dockerfile:version 'GLIBC_2.39' not founderrors when runningcargo-acap-sdk. The best explanation I could find for this is that the host pre-built standard lib depends on different versions depending on the platform they were build on..devhost/install-rust.sh:rustup-initto avoid the problem documented in Add explicit platform to Dockerfile FROM statements #70.README.md:make check_generated_files_container. Note thatinspect_envstill doesn't reproduce.Footers
Related-to: #229