Adding Utility to container image

19 views
Skip to first unread message

Joe Kale

unread,
Jun 24, 2025, 9:21:33 AMJun 24
to kas-devel
Is there a noted, preferred method for adding packages to the kas container image? A project I am working on is using scientific python packages which compile with fortran. Simple to add to a bitbake conf file, but the host system needs to have gfortran installed. Currently I get around it with `kas-container shell` and manually install apt but that won't work long term when I need it automated with CI. I don't see a method to change the kas-container image but I could very easily be missing it.

Thank you,
Joe Kale

Jan Kiszka

unread,
Jun 24, 2025, 1:21:23 PMJun 24
to Joe Kale, kas-devel
If you have a custom scenario, not generic enough to sell it to everyone
(i.e. to get that package set into the standard container) and make
everyone pay for it (larger standard container), then you should derive
an own container from kas (FROM ghcr.io/siemens/kas/kas) and set the
KAS_CONTAINER_IMAGE env var in your build environments to that own
image. We have some few cases internally as well where this is or was
done similarly.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Joe Kale

unread,
Jul 1, 2025, 9:11:14 AMJul 1
to kas-devel
Looks like the gfortran package on debian bookworm takes up 16kb of space. Would be negligible to add to the official image, but I don't know how common it is to use it. OpenEmbedded disables using fortran by default and I'm unsure how many users enable it. Thank you for pointing me to KAS_CONTAINER_IMAGE, I must not have been reading closely enough.

Joe

Jan Kiszka

unread,
Jul 2, 2025, 1:59:19 AMJul 2
to Joe Kale, kas-devel
On 01.07.25 15:11, Joe Kale wrote:
> Looks like the gfortran package on debian bookworm takes up 16kb of
> space. Would be negligible to add to the official image, but I don't
> know how common it is to use it. OpenEmbedded disables using fortran by
> default and I'm unsure how many users enable it. Thank you for pointing
> me to KAS_CONTAINER_IMAGE, I must not have been reading closely enough.

If you have a case like, "in order to compile this set of publicly
available yocto layers, you need gfortran installed on the builder", we
can discuss this. 16K is nothing, but here it is about where to draw the
line between "useful extensions for more than one user" and "private use
cases".

Joe Kale

unread,
Jul 2, 2025, 12:01:25 PMJul 2
to kas-devel
Right now the layer I am using is the meta-python-ai layer. https://github.com/zboszor/meta-python-ai
Not sure how common the layer is, but they do instruct the user to add gfortran to the HOSTTOOLS variable. I haven't come across any others as of yet.

Thank you,
Joe

Jan Kiszka

unread,
Jul 3, 2025, 2:10:26 AMJul 3
to Joe Kale, kas-devel
On 02.07.25 18:01, Joe Kale wrote:
> Right now the layer I am using is the meta-python-ai layer. https://
> github.com/zboszor/meta-python-ai
> Not sure how common the layer is, but they do instruct the user to add
> gfortran to the HOSTTOOLS variable. I haven't come across any others as
> of yet.
>

Please check if there are other layers that need gfortran but solve that
topic differently.

BTW, the size increase will be more likely measured in dozens of MB, not
KB, because gfortran is just a meta packages that depends on the actual
compiler: https://packages.debian.org/bookworm/gfortran-12

Jan

> Thank you,
> Joe
>
> On Wednesday, July 2, 2025 at 12:59:19 AM UTC-5 Jan Kiszka wrote:
>
> On 01.07.25 15:11, Joe Kale wrote:
> > Looks like the gfortran package on debian bookworm takes up 16kb of
> > space. Would be negligible to add to the official image, but I don't
> > know how common it is to use it. OpenEmbedded disables using
> fortran by
> > default and I'm unsure how many users enable it. Thank you for
> pointing
> > me to KAS_CONTAINER_IMAGE, I must not have been reading closely
> enough.
>
> If you have a case like, "in order to compile this set of publicly
> available yocto layers, you need gfortran installed on the builder", we
> can discuss this. 16K is nothing, but here it is about where to draw
> the
> line between "useful extensions for more than one user" and "private
> use
> cases".
>
> Jan
>
> --
> Siemens AG, Foundational Technologies
> Linux Expert Center
>
> --
> You received this message because you are subscribed to the Google
> Groups "kas-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to kas-devel+...@googlegroups.com <mailto:kas-
> devel+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/kas-
> devel/2aad3f12-aaba-4708-aa9b-8efe310cef44n%40googlegroups.com <https://
> groups.google.com/d/msgid/kas-devel/2aad3f12-aaba-4708-
> aa9b-8efe310cef44n%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages