-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add docker and apptainer image building on demand #176
Conversation
Codecov Report
|
…_apptainer' into feat/add_docker_and_apptainer
Looks like the docker image builds fine but we run out of space when building the apptainer image, going to try a few hacks to fix this |
.github/workflows/docker.yaml
Outdated
on: | ||
push: | ||
branches: | ||
- feat/add_docker_and_apptainer |
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 will remove this before we merge it in
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.
Looks good to me!
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true | ||
sudo rm -rf \ | ||
/usr/share/dotnet /usr/local/lib/android /opt/ghc \ | ||
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \ | ||
/usr/lib/jvm || true | ||
echo "some directories deleted" | ||
sudo apt install aptitude -y >/dev/null 2>&1 | ||
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \ | ||
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \ | ||
google-cloud-sdk imagemagick \ | ||
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \ | ||
mercurial apt-transport-https mono-complete libmysqlclient \ | ||
unixodbc-dev yarn chrpath libssl-dev libxft-dev \ | ||
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \ | ||
snmp pollinate libpq-dev postgresql-client powershell ruby-full \ | ||
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \ | ||
-y -f >/dev/null 2>&1 | ||
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1 | ||
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true | ||
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true | ||
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1 | ||
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1 | ||
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1 | ||
sudo apt-get autoremove -y >/dev/null 2>&1 | ||
sudo apt-get autoclean -y >/dev/null 2>&1 | ||
echo "some packages purged" |
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.
That's a lot of things that have to be remove/purged from the ubuntu image, I wonder if we should eventually try a lighter docker image for our purposes.
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 actually running on the host, not inside the image. The image we base on is quite small, but the host has a TON of stuff, so I found that I ran out of space when building the singularity image after building the docker image.
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.
Oh yeah, I did notice that after I wrote my comment, but I guess the point still stands that we might want to use something smaller compared to ubuntu-latest
for the host (even though I know this could change many things for us, just something to keep in mind in the future)
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.
From here https://github.com/actions/runner-images#available-images and skimming that page, I don't think github plans on making any minimal images
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.
Oh ok, then this is as good as it gets! :) Thanks for checking that out.
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 problem! Thanks for giving me the idea to check!
This PR will let us build docker and apptainer (singulairty) images using github action's workflow dispatch feature