feat: adopt mitodl/ol-python-base:3.12 and add BuildKit cache mounts#3447
Draft
blarghmatey wants to merge 1 commit into
Draft
feat: adopt mitodl/ol-python-base:3.12 and add BuildKit cache mounts#3447blarghmatey wants to merge 1 commit into
blarghmatey wants to merge 1 commit into
Conversation
- FROM mitodl/ol-python-base:3.12 replaces the duplicated substrate stages (apt core, uv binary, mitodl user, /opt/venv env vars). - App-specific apt (libcairo2-dev, poppler-utils, default-jre, chromium, chromium-driver) kept inline with BuildKit --mount=type=cache for apt, keeping downloaded packages out of the image layer. - BuildKit --mount=type=cache on uv sync so uv.lock-bump rebuilds reuse the download cache across Tilt builds (target=/opt/uv-cache uid=1000). - apt.txt trimmed to extras only; common-core packages documented as living in the shared base image. - Image size: 4.36 GB → 3.71 GB (-650 MB).
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
N/A
Description (What does it do?)
Adopts the new shared Python base image and adds BuildKit cache mounts to speed up cold-build and
uv.lock-bump rebuilds in the Tilt/K3d local-dev environment.Changes:
FROM mitodl/ol-python-base:3.12replaces the four duplicated substrate stages (apt core, uv binary, mitodl user, /opt/venv env vars). The shared base is defined in https://github.com/mitodl/ol-infrastructure/tree/main/dockerfiles/ol-python-base.--mount=type=cachefor apt so downloaded packages are not baked into the image layer.--mount=type=cache,target=/opt/uv-cache,uid=1000,gid=1000onuv syncsouv.lock-bump rebuilds reuse the download cache across Tilt builds rather than re-downloading all wheels.apt.txttrimmed to extras only; the common-core packages it previously listed are now in the base image.Image size: 4.36 GB → 3.71 GB (−650 MB), which cuts the ~119s registry push proportionally.
How can this be tested?
After mitodl/ol-infrastructure#4750 merges and the Concourse pipeline publishes the base image:
In the local-dev Tilt environment:
tilt upmit-learn, confirm live_update still syncs Python source and triggers granian reload.Additional Context
Part of a multi-repo series to eliminate duplicated Dockerfile substrate and speed up Tilt/K3d cold builds. Baseline: cold
tilt upfor mit-learn spent ~163s building and ~119s pushing its 4.36 GB image to the local k3d registry atlocalhost:5001. The shared base image (~590 MB) plus per-app layer slimming reduces both dimensions.Merge order: ol-infrastructure PR first → Concourse pipeline registered → this PR can be merged.