From 88fa75bbd6b22dcb1f54a8ed66d568deb71ad914 Mon Sep 17 00:00:00 2001 From: Cail Daley Date: Wed, 9 Sep 2026 16:04:08 +0200 Subject: [PATCH 1/2] Container: TinyTeX (pinned TeX Live 2025) instead of apt texlive The texlive-latex-base/-recommended/-fonts-recommended + cm-super set added in #338 costs ~1.3 GB and still lacks type1cm.sty, so matplotlib's usetex path stays broken. Replace it with TinyTeX (~270 MB measured), pinned to TeX Live 2025 on both halves: bundle v2026.02, and tlmgr pointed at that year's frozen tlnet-final historic mirror. Packages are an explicit tlmgr list covering matplotlib's usetex preamble. Co-Authored-By: Claude Fable 5.1 --- Dockerfile | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 560df4b2..2124d2fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,14 +20,45 @@ RUN apt-get update -y --quiet --fix-missing && \ libgsl-dev \ libcfitsio-dev \ libfftw3-dev \ - texlive-latex-base \ - texlive-latex-recommended \ - texlive-fonts-recommended \ - dvipng \ - ghostscript \ - cm-super && \ + perl \ + curl \ + ghostscript && \ rm -rf /var/lib/apt/lists/* +# TeX, for matplotlib's usetex path (paper.mplstyle) and any LaTeX output. +# TinyTeX rather than apt's texlive-*: those metapackages cost ~1.3 GB and +# still omit type1cm.sty, which matplotlib's usetex preamble loads. TinyTeX is +# a minimal TeX Live with tlmgr, so the package set below is explicit and +# adding one is a one-line change. +# +# Both halves are pinned to TeX Live 2025: the TinyTeX bundle v2026.02 is the +# last release built on it, and tlmgr points at that year's frozen tlnet-final +# historic mirror, so this layer resolves the same way forever. Update once a +# year by bumping TINYTEX_VERSION and the mirror year together. +ENV TEXLIVE_YEAR=2025 \ + TINYTEX_VERSION=2026.02 \ + TINYTEX_DIR=/opt \ + PATH=/opt/.TinyTeX/bin/x86_64-linux:$PATH +RUN set -eux; \ + curl -fsSL https://yihui.org/tinytex/install-bin-unix.sh | sh; \ + tlmgr option sys_bin /usr/local/bin; \ + tlmgr option repository \ + "https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${TEXLIVE_YEAR}/tlnet-final/"; \ + tlmgr option docfiles 0; \ + tlmgr option srcfiles 0; \ + tlmgr install \ + type1cm \ + cm-super \ + dvipng \ + underscore \ + ulem \ + amsmath \ + amsfonts \ + geometry \ + xcolor; \ + tlmgr path add; \ + latex --version >/dev/null; dvipng --version >/dev/null + # The base shapepipe image provides a uv-managed venv at /app/.venv (exported as # VIRTUAL_ENV); install sp_validation's deps into that same venv rather than # spawning a second one under /sp_validation. From e9aa8ac707a1973669d2bf9b5073bb2ccad07d3c Mon Sep 17 00:00:00 2001 From: Cail Daley Date: Wed, 9 Sep 2026 23:16:42 +0200 Subject: [PATCH 2/2] Container: trim the TinyTeX comment Co-Authored-By: Claude Fable 5.1 --- Dockerfile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2124d2fa..844f7e23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,16 +25,7 @@ RUN apt-get update -y --quiet --fix-missing && \ ghostscript && \ rm -rf /var/lib/apt/lists/* -# TeX, for matplotlib's usetex path (paper.mplstyle) and any LaTeX output. -# TinyTeX rather than apt's texlive-*: those metapackages cost ~1.3 GB and -# still omit type1cm.sty, which matplotlib's usetex preamble loads. TinyTeX is -# a minimal TeX Live with tlmgr, so the package set below is explicit and -# adding one is a one-line change. -# -# Both halves are pinned to TeX Live 2025: the TinyTeX bundle v2026.02 is the -# last release built on it, and tlmgr points at that year's frozen tlnet-final -# historic mirror, so this layer resolves the same way forever. Update once a -# year by bumping TINYTEX_VERSION and the mirror year together. +# TinyTeX pinned to a TeX Live year (frozen tlnet-final mirror); bump both once a year. ENV TEXLIVE_YEAR=2025 \ TINYTEX_VERSION=2026.02 \ TINYTEX_DIR=/opt \