
Hi Hraban, Hans, On Sat, 2025-07-12 at 18:56 +0200, Henning Hraban Ramm wrote:
I don’t even need modules in this case – I don’t think all of them are included in TeX live, need to check…
Most of them should be included in TeX Live, but if there are any important ones that aren't, let me or Taco know, and it should be pretty easy to add them to TL. On Sat, 2025-07-12 at 20:05 +0200, Hans Hagen via ntg-context wrote:
I'm pretty sure Max will manage to get a minimal install (without the texlive base overhead) + modules working.
Ok, I just tested it, and the LMTX standalone distribution with all modules installed is 479MB (including documentation), TeX Live with scheme-context (which includes MkII, MkIV, and MkXL, all the modules, but no documentation) is 514MB, and TL with scheme-infraonly and the "context" package (MkXL only, without MkIV, any modules, or documentation) is 129MB.
Maybe caching is the main challenge.
Generating the caches adds another 286MB, but also substantially shortens the runtime. My current cache generation script consists of the following: context --make mtxrun --script fonts --reload context context-cache.tex context --luatex --make mtxrun --luatex --script fonts --reload context --luatex context-cache.tex where context-cache.tex is the following: \starttext \startbuffer[line] \tf The quick brown fox jumps over the lazy dog. $\sqrt{x^2} \mathbb{R}_0$ \par \it The quick brown fox jumps over the lazy dog. $\sqrt{x^2} \mathbb{R}_0$ \par \bf The quick brown fox jumps over the lazy dog. $\sqrt{x^2} \mathbb{R}_0$ \par \bi The quick brown fox jumps over the lazy dog. $\sqrt{x^2} \mathbb{R}_0$ \par \stopbuffer \getbuffer[line] \par \switchtobodyfont[modern,ss] \getbuffer[line] \par \switchtobodyfont[modern,tt] \getbuffer[line] \par \switchtobodyfont[adventor] \getbuffer[line] \par \switchtobodyfont[bonum] \getbuffer[line] \par \switchtobodyfont[chorus] \getbuffer[line] \par \switchtobodyfont[cursor] \getbuffer[line] \par \switchtobodyfont[heros] \getbuffer[line] \par \switchtobodyfont[pagella] \getbuffer[line] \par \switchtobodyfont[schola] \getbuffer[line] \par \switchtobodyfont[termes] \getbuffer[line] \par \switchtobodyfont[dejavu] \getbuffer[line] \par \switchtobodyfont[dejavu,ss] \getbuffer[line] \par \switchtobodyfont[dejavu,tt] \getbuffer[line] \par \switchtobodyfont[libertinus] \getbuffer[line] \par \switchtobodyfont[libertinus,ss] \getbuffer[line] \par \switchtobodyfont[libertinus,tt] \getbuffer[line] \par \switchtobodyfont[plex] \getbuffer[line] \par \switchtobodyfont[plex,ss] \getbuffer[line] \par \switchtobodyfont[plex,tt] \getbuffer[line] \par \switchtobodyfont[stixtwo] \getbuffer[line] \par \stoptext
And then also write a wrapup how to use that docker efficiently (connect to local file system for a run and such).
I've generally moved away from installing TeX inside of Docker images, because for TeX Live, any update (which happen daily) means that you need to re-download a 5GB image from scratch (although zstd-chunked helps a lot here). My current preferred strategy is to maintain TeX installations on the host system, and then bind-mount them into all my container images. Theoretically, this means that you can't run the images on any host, but practically speaking, it makes things much easier for me, since I only need to download a tiny container image to run it locally, instead of having to wait forever to download a 5GB image when I already have multiple TeX systems installed. I've been using this strategy for the past few months to test and bundle the extractbb and ConTeXt packages for TL: https://github.com/gucci-on-fleek/extractbb https://github.com/gucci-on-fleek/context-packaging Thanks, -- Max