Repository navigation
Contender 2 (Ultra-Slim Runtime): Cut pythonr to 2.87 GB (-53.9%) and python to 1.49 GB (-26.1%) with build-time ldd check - #142
Merged
Conversation
…ilds, and multi-threaded OpenBLAS/GDAL/Arrow defaults
…-26% on python) retaining C/C++ -dev headers
…n to 2.87 GB) with build-time ldd check
Contributor
Author
|
Going to merge this one for smallest images. |
This was referenced Nov 3, 2026
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 — Contender 2: Ultra-Slim Runtime (
python1.49 GB,pythonr2.87 GB)Following a 12-combination deep-dive optimization study across
geocompx/docker, this PR implements Contender 2 (Ultra-Slim Runtime), cuttinggeocompx/pythonrfrom 6.21 GB down to 2.87 GB (-3.35 GB / -53.9% — more than 53% smaller!) andgeocompx/pythonfrom 2.01 GB down to 1.49 GB (-526.2 MB / -26.1%).How Contender 2 Differs from Contender 1 (#141)
r-4.6.2.debalready includesgcc,g++,gfortran,make,libopenblas-dev,libcurl4-openssl-dev,libicu-dev,libcairo2,libx11-6, andlibgomp1(so C++ packages likeset6anddistr6compile from source out of the box), and all 367 CRAN/geocompx packages (sf,terra,s2,lwgeom,stars,gdalcubes,arrow,V8,magick,gert,httpgd,svglite,jgd,unigd, etc.) install from P3M precompiled Linux binaries, they link dynamically against runtime.sopackages rather than-devpackages.-devpackages (libgdal-dev,libmagick++-dev,libnode-dev,libabsl-dev, etc., which transitively pulled inlibboost1.83-dev,libspatialite-dev,libxerces-c-dev,libfftw3-dev,libhdf5-dev,gir1.2-glib-2.0-dev, andlibpython3.13-stdlib) with the exact runtime.sopackages (libopenblas0-pthread,liblapack3,libgdal36,libgeos-c1t64,libproj25,libudunits2-0,libglpk40,libmagick++-7.q16-5,libnode115,libgit2-1.9,libabsl20240722,libuv1t64,libfribidi0,libharfbuzz0b,libtiffxx6) saves an additional 295 MB over Contender 1 (Contender 1 (Dev-Ready Slim): Cut pythonr to 3.16 GB (-49.1%) and python to 1.49 GB (-26.1%) while retaining C/C++ -dev headers #141).lddassertion (! (LD_LIBRARY_PATH="/opt/R/current/lib/R/lib:${LD_LIBRARY_PATH}" ldd /opt/R/current/lib/R/library/*/libs/*.so 2>/dev/null | grep "not found")) that fails the Docker build immediately if any of the 374 installed R packages ever has a missing shared library dependency.Verified Benchmarks Across All Contenders
geocompx/pythonSizegeocompx/pythonrSizepythonrBuild Timemaster)