build: remove R dependencies from stats image - #56
Merged
Merged
Conversation
The plots have been generated with matplotlib since #25 and #26 made it the default. Drop r-base, r-cran-ggplot2 and python3-rpy2 from the apt install and rpy2/ggplot from requirements_plot.txt, merge the apt layers so the list cleanup takes effect, and skip the pip cache. Image size (local build): 5.67 GB -> 1.75 GB
sebastian-nagel
approved these changes
Sep 23, 2026
sebastian-nagel
left a comment
Contributor
There was a problem hiding this comment.
+1 Thanks, @malteos!
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.
Summary
Since #25 replaced ggplot2 with matplotlib and #26 made matplotlib the default plot library, the R toolchain in the stats image has been dead weight. This PR removes it.
stats.Dockerfile: dropr-base,r-cran-ggplot2andpython3-rpy2; merge the two apt layers sorm -rf /var/lib/apt/lists/*takes effect; add--no-install-recommendsand pip--no-cache-dir.requirements_plot.txt: droprpy2(needs R to build) and the deprecatedggplotpackage.git,jq,awscli,graphviz-dev(pygraphviz) and the fonts used by matplotlib are kept. No Python code is changed; therpy2.ggplot2branches are lazily imported and never run withPLOTLIB=matplotlib.Image size
Local podman builds of the same commit (linux/arm64, uncompressed):
Verification
R/Rscriptin the image;pip listshows no rpy2/ggplot;matplotlib,pandas,pygraphviz,fsspecimport fine; Liberation Sans is resolved by matplotlib.python -m pytest -s tests/, as in CI).get_stats_and_plot.shpipeline over all 128 crawls in both the old and the new image. All 30 PNGs and every CSV/HTML/MD output are byte-identical to the committed files.