optionally enable ccache for use in Dockerfiles#21563
Conversation
…d step - minor formatting
… step - code formatting
…d step - code formatting
…ld step - code formatting
…nt in build step - code formatting
…build step - code formatting
…d step - code formatting
ccache was already installed and always used, - did not change
…ild step - code formatting
|
Do you have benchmarks to showcase the speed differences? |
|
I did not measure because it is big, on my system a full built to the "server" stage takes most likely between 10 to 15 minutes, while an enabled cache should lead to something well below 1 minute in case of a recompilation. Fair enough or do you need exact numbers? |
|
@t-hofmann Do I understand correctly that One of the option is to leverage docker image inline cache. |
|
The Regarding the "github cache": Neither do I know how github caches in this context nor am I in the position to test if the change influences its usage. apropos merge below: please be aware, that I am not the author of the one-API related changes |
Overview
This pull-request addresses #21225, which is about faster recompilation in
Dockerfilesby enabling a build cache.Additional information
The solution introduces a new build-time argument
CCACHE_ENABLED(default:false). Which iftrueleads to installation ofccachein the Dockerfiles.A cache-mount was added to the actual build step
RUN ... make .... The cache will only be used ifccacheis installed, so the cache-mount can unconditionally be added there.In
s390x.Dockerfileccachewas already installed and always used, - that behaviour is unchanged. - Would be happy to change if need be.Only
cuda.Dockerfileis manually tested by compiling, starting and accessing the web-interface.Requirements