Add ccache for cmake caching + optimise dockerfile ordering for cache usage#1959
Add ccache for cmake caching + optimise dockerfile ordering for cache usage#1959spwoodcock wants to merge 4 commits intomasterfrom
Conversation
|
I'm working on something similar to optimize the docker build steps, but mostly trying to make the start-dev-env script a bit more easier to use. Currently if you delete the odmdev container, you have to rerun everything from scratch, really inconvenient. I'm trying to make it a 3 stages build and the first stage, which only installs the dev dependency can be saved for use of @spwoodcock @smathermather I think I'll continue my work after this PR is merged, but below is my work in progress, if you can provide feedback, it would be much appreciated |
|
Thanks @originlake! Sorry for the slow reply with the Christmas break 😄 The changes you propose could be useful. I also planned to optimise the builds a bit, after finishing my PR for using Feel free to make a PR that targets this branch if you wish to extend from the ccache optimisation 🙏 |
Port build speed improvements from PR OpenDroneMap#1959 to gpu.Dockerfile: - Add ccache (CC/CXX/CCACHE_DIR env vars + apt install) - Split COPY commands so system deps and SuperBuild compile layers are cached independently from application code changes - Use RUN --mount=type=cache for the cmake/make step - Copy docker/ early since PORTABLE_INSTALL needs the gcc/g++ wrappers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dockerfile caching
requirements.txtusing the ccache cache, giving 1626.3s build time - big improvement!CI caching
Note
The windows build and GPU build CI workflows also need updating to match this.
Testing with the single workflow first, then we can propagate across.