-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Move Earthly logic into Dockerfiles #2008
Conversation
8bca420
to
ac2bdbe
Compare
9ea4c4d
to
cb90777
Compare
85d279a
to
d10ef9d
Compare
I cannot test the Nvidia image, but I've uploaded it here to |
@@ -338,15 +338,5 @@ | |||
"baseImage": "rockylinux:9", | |||
"arch": "amd64", | |||
"worker": "self-hosted" | |||
}, | |||
{ | |||
"family": "nvidia", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it from the flavors because this one is no longer a family/distribution of its own but instead it uses the ubuntu family via the BYOI. See image-arm.yaml and release.yaml to see how the two work together
@@ -57,6 +57,84 @@ jobs: | |||
# end of optional handling for multi line json | |||
echo "::set-output name=matrix::{\"include\": $content }" | |||
|
|||
build-nvidia-base: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the nvidia base image will only be built if its dockerfile changed or if it's a release (see release-arm.yaml). This will save some runners time and I would actually like to do something similar with all other base images so I created a ticket for this #2034
run: | | ||
docker push quay.io/kairos/ubuntu:nvidia-jetson-agx-orin-master | ||
|
||
nvidia-arm-core: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvidia now is just consuming the factory with the ubuntu family and passing its base image
--IMG_COMPRESSION=${{env.IMG_COMPRESSION}} | ||
- name: Show img sizes | ||
run: | | ||
ls -ltra build | ||
ls -ltrh build | ||
- name: Convert all json files into a reports.tar.gz file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extended it so it can also be used on release-arm.yaml
rc-update add fail2ban | ||
|
||
# Symlinks to make elemental installer work | ||
RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done on the kairos section now
############################################################### | ||
#### Post-Process Common to All #### | ||
############################################################### | ||
FROM all | ||
RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in kairos section now
@@ -0,0 +1,86 @@ | |||
# WARNING: Do not build this image on its own, use the different Dockerfile.kairos-* instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not an independent image but the section that needs to run after the different family/distribution dockerfiles. At first I had this as an independent dockerfile that can run by passing a base image, however Earthly does not play well with local images, so for now I am using the target +kairos-dockerfile to concat the necessary family/distro dockerfile and this file. This is not ideal but I think it's a good step in the right direction, if we then publish base images #2034 then we can convert this one to a proper dockerfile and remove the target, plus the whole thing should be much faster
RUN rm -rf /etc/apt/sources.list.d/nvidia-l4t-apt-source.list | ||
|
||
# Symlinks to make installer work | ||
RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is now done in the kairos section
ARG FRAMEWORK_VERSION=master | ||
# Not to be confused with the concept of MODEL, this is either fips or generic | ||
ARG SECURITY_PROFILE=generic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are only here because I need to concat the files using the +kairos-dockerfile target, once #2034 is address they can be removed
# Regenerate initrd if necessary | ||
RUN if [ -f "/usr/bin/dracut" ]; then \ | ||
kernel=$(ls /lib/modules | head -n1) && \ | ||
dracut -f "/boot/initrd-${kernel}" "${kernel}" && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just force dracut to overwrite the existing /boot/initrd directly?? that avoids one extra step here to link it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Itxaka hmm, sounds like a good idea, how does that work? for alpine if I understood correctly we would just need to remove the --no-scripts
flag right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I meant that on alpine we generate the file directly overwriting anything while on dracut we generate a file and then soft link it for some reason? Dracut should be able to overwrite the file directly, so we don't need to link it afterwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking pretty good!
Could you link the issue for the docker images from earthly so we can track it down the line?
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
316ffc6
to
5ff0d97
Compare
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Fixes #1897