[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "guix pack -f docker" does too much work
From: |
Suhail Singh |
Subject: |
Re: "guix pack -f docker" does too much work |
Date: |
Sat, 14 Sep 2024 20:42:29 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Ricardo Wurmus <rekado@elephly.net> writes:
>>>> I think it would be great if "guix pack -f docker" could avoid building
>>>> all these identical layers again and again. Perhaps it would be
>>>> possible to have a single derivation for each layer? This way we
>>>> wouldn't have to recreate the same layer archives every time.
>>>
>>> That sounds nice in terms of saving CPU time. It’s less nice in terms
>>> of disk usage: a single ‘guix pack -f docker’ run would populate the
>>> store with roughly twice the size of the closure.
>>>
>>> I think each solution (single derivation vs. one derivation per layer)
>>> makes a different tradeoff. I don’t have a strong feeling about which
>>> one is better.
>>
>> In past discussions (such as the implementation of the 'RPM' pack
>> format) we had concluded that a single derivation was preferable. Large
>> chunks to be sent to offload machines over the network are not very
>> practical, and as Ludovic said, they also require more store space.
>
> Dependent on the situation I can see one approach to be preferrable to
> the other, and in other situations this could very well be reversed.
I agree.
> Can we expose this choice to the command line interface of "guix pack"?
That would be quite helpful, indeed. Happy to help with this if someone
can point me in the right direction, provided the effort of "pointing me
in the right direction" isn't too great to be impractical.
--
Suhail