On 3/29/23 12:32, Ales Musil wrote:
> On Wed, Mar 29, 2023 at 9:55 AM Dumitru Ceara <dce...@redhat.com> wrote:
> 
>> On 3/29/23 09:43, Dumitru Ceara wrote:
>>> On 3/29/23 07:29, Ales Musil wrote:
>>>> On Tue, Mar 28, 2023 at 4:48 PM Dumitru Ceara <dce...@redhat.com>
>> wrote:
>>>>
>>>>> On 3/15/23 07:29, Ales Musil wrote:
>>>>>> Add missing jemalloc, kmod and scapy packages.
>>>>>> Install scapy through pip, because the
>>>>>> python3-scapy package has a lot of dependencies
>>>>>> that would increase the overall size of the image
>>>>>> by ~800 MB.
>>>>>>
>>>>>> Signed-off-by: Ales Musil <amu...@redhat.com>
>>>>>> ---
>>>>>>  utilities/containers/fedora/Dockerfile   | 2 ++
>>>>>>  utilities/containers/py-requirements.txt | 1 +
>>>>>>  2 files changed, 3 insertions(+)
>>>>>>
>>>>>> diff --git a/utilities/containers/fedora/Dockerfile
>>>>> b/utilities/containers/fedora/Dockerfile
>>>>>> index be8cd6ff2..d24bf1232 100755
>>>>>> --- a/utilities/containers/fedora/Dockerfile
>>>>>> +++ b/utilities/containers/fedora/Dockerfile
>>>>>> @@ -19,7 +19,9 @@ RUN dnf -y update \
>>>>>>          iproute \
>>>>>>          iproute-tc \
>>>>>>          iputils \
>>>>>> +        jemalloc-devel \
>>>>>>          kernel-devel \
>>>>>> +        kmod \
>>>>>>          libcap-ng-devel \
>>>>>>          libtool \
>>>>>>          net-tools \
>>>>>
>>>>> I think it might be better to follow the official installation
>> procedure
>>>>> and instead of doing this do something like:
>>>>>
>>>>>
>>>>>
>> https://github.com/ovn-org/ovn/blob/1bec9e3ddd8500793b52e11c3dc1f41ef1f48591/.ci/ovn-kubernetes/Dockerfile#L19
>>>>>
>>>>> RUN sed -e 's/@VERSION@/0.0.1/' rhel/openvswitch-fedora.spec.in >
>>>>> /tmp/ovs.spec
>>>>> RUN dnf builddep -y /tmp/ovs.spec
>>>>>
>>>>>
>>>>>
>> https://github.com/ovn-org/ovn/blob/1bec9e3ddd8500793b52e11c3dc1f41ef1f48591/.ci/ovn-kubernetes/Dockerfile#L28
>>>>>
>>>>> RUN sed -e 's/@VERSION@/0.0.1/' rhel/ovn-fedora.spec.in >
>> /tmp/ovn.spec
>>>>> RUN dnf builddep -y /tmp/ovn.spec
>>>>>
>>>>> There's still the risk that a new dependency is added and the new image
>>>>> hasn't been built/pushed yet.  How do you think it's best to address
>>>>> that?
>>>>>
>>>>
>>>> We can trigger the image manually so if something new is added we will
>>>> trigger the job
>>>> once it is merged. I'm more concerned about those being build
>> dependencies,
>>>> not test dependencies
>>>
>>> Good point.
>>>
>>>> which can be misleading. However if the vote is in favor of updating the
>>>> spec file with all the dependencies
>>>
>>> I'm not sure we want to add stuff like nc or tcpdump as build
>>> dependencies though.  Can we at least shorten the list by first
>>> installing the build deps and then installing the packages required for
>>> testing?
>>>
>>
>> After another look at the spec file for Fedora I see we have:
>>
>> %if %{with check}
>> BuildRequires: tcpdump
>> %endif
>>
>> Can we use this and conditionally install packages only if we plan to
>> run checks?
>>
>>>> for tests I'm fine with that.
>>>>
>>>>
>>>
>>
>>
> After testing the suggestion there is a couple points that are more in
> favor of
> list inside the Dockerfile:
> 
> 1) The dependencies installed from the spec file increase the container
> size by 500 MB,
> it due to installation of python3-sphinx as rpm vs the pip installation of
> sphinx.
> Which is IMO very bad, going from 1.25 GB to 1.77 GB (>40% increase).
> 
> 2) I'm not sure if we can do something similar on Ubuntu.
> 
> 3) Currently we actually use pip to install some python dependencies and the
> dependencies in containers follow this approach.
> 

It's a bit unfortunate but let's keep it as it is then.  Thanks a lot
for checking!

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to