Skip to content
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

Remove old compiled spt3g/so3g layers from Docker image #397

Merged
merged 5 commits into from
Aug 2, 2024

Conversation

BrianJKoopman
Copy link
Member

Description

This PR rebases the ocs Docker image onto the ubuntu:22.04 base image. It also sets up and enables a Python virualenv for the ocs installation.

Motivation and Context

This has been long overdue, but historically we built upon the simonsobs/so3g image, which is built upon the simonsobs/spt3g image, which in turn was built upon ubuntu:22.04.

This chain of images was to facilitate installation of the spt3g/so3g stack, which prior to so3g becoming pip installable needed to be compiled. Each layer compiled its respective package. Now that we can (and do) install so3g from pip, and so3g brings its own spt3g with it, we don't need these base layers.

There were a few issues with this historical stack still being in place, the largest of which is that somehow in the build process Python 3.10 was being replaced with Python 3.8. (3.10 is present in simonsobs/so3g, but only 3.8 is present in simonsobs/ocs.) This may have exacerbated the setuptools issue in #391.

This also saves a bunch of disk space, since we don't have everything needed to compile spt3g/so3g in the image anymore. Compare these two builds to see it's about 1.2GB!

REPOSITORY        TAG                  IMAGE ID       CREATED              SIZE
ocs               main                 6885fb6b5fe3   About a minute ago   2.67GB
ocs               rework               96e71b04582c   About a minute ago   1.46GB

The virtualenv setup also prepares us for the update to ubuntu:24.04, which comes with Python 3.12 which enforces uses of virtual environments.

How Has This Been Tested?

Builds and tests have been run locally and all pass.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

This cuts out the spt3g-docker and so3g layers in the image build. ocs will
pull in so3g from pip, these extra layers were from when we needed to compile
spt3g_software and so3g prior to so3g becoming pip installable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant