Use a curated TeX Live set instead of near-full to speed up builds
Build and Deploy Verso / deploy (push) Successful in 14m42s

The previous install expanded texlive-full (minus -doc/-lang-), pulling in
essentially every CTAN package plus inkscape's large GTK GUI tree — ~20 min
and several GB. Replace it with a curated set of meta-packages that covers
the vast majority of documents: latex base/recommended/extra, recommended
fonts, plain-generic, science (math/physics), xetex, luatex, bibtex-extra,
extra-utils (texcount), plus latexmk/biber/chktex/pygments.

Smaller and faster to build. Documents needing an omitted package can have
the relevant texlive-* collection added back. Drops inkscape (only used for
auto SVG->PDF conversion) to avoid its heavy GUI dependency chain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
claude
2026-05-31 21:52:56 +00:00
parent 7c86657548
commit 4800a51957
+22 -12
View File
@@ -72,21 +72,31 @@ RUN mkdir -p /opt/quarto-extensions \
# Install TeX Live (for compiling .tex projects with latexmk)
# -----------------------------------------------------------------------
# Verso compiles .qmd with Quarto and .tex with latexmk; both engines live
# side by side. We install (almost) all of texlive-full, excluding the -doc
# and -lang- packages to keep the download from being needlessly huge while
# still providing a complete LaTeX toolchain (latexmk, xetex, lualatex,
# biber, texcount, chktex, synctex, etc.).
# side by side. Rather than (almost) all of texlive-full — which pulls in
# every CTAN package and takes ~20 min to build — we install a curated set
# of meta-packages covering the vast majority of real documents: the latex
# base/recommended/extra collections, recommended fonts, science/math
# packages, both alternative engines (xetex, luatex), and bibliography
# tooling. This is a few GB smaller and noticeably faster to build.
#
# If a document needs a package not included here, add the relevant
# texlive-* collection below (e.g. texlive-fonts-extra, texlive-publishers,
# texlive-humanities) and rebuild. We deliberately omit inkscape, whose GTK
# GUI dependency tree is large and only needed for auto SVG->PDF conversion.
# -----------------------------------------------------------------------
RUN apt-get update \
&& apt-cache depends texlive-full \
| grep "Depends: " \
| grep -v -- "-doc" \
| grep -v -- "-lang-" \
| sed 's/Depends: //' \
| xargs apt-get install -y --no-install-recommends \
&& apt-get install -y --no-install-recommends \
texlive-xetex texlive-luatex texlive-bibtex-extra biber \
texlive-extra-utils latexmk chktex fontconfig inkscape python3-pygments \
texlive-latex-base \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-plain-generic \
texlive-science \
texlive-xetex \
texlive-luatex \
texlive-bibtex-extra \
texlive-extra-utils \
latexmk biber chktex fontconfig python3-pygments \
&& rm -rf /var/lib/apt/lists/*