Skip to content

Commit 3177d5f

Browse files
committed
Merge remote-tracking branch 'origin/test'
2 parents 7cbd4f8 + 642cc91 commit 3177d5f

1,951 files changed

Lines changed: 15893 additions & 8512 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# .gitattributes for CLMS_documents
22

3-
# Always keep the target branch's version of .llm_cache during merges
4-
.llm_cache/** merge=ours linguist-generated
3+
# Mark .llm_cache as generated so diffs are collapsed in GitHub PRs
4+
.llm_cache/** linguist-generated
55

66
# Text files with LF line endings
77
*.sh text eol=lf

.github/config/_quarto-index.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/runners/Dockerfile.llm-doc-annotator

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/runners/Dockerfile.quarto-doc-builder

Lines changed: 62 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,81 @@
1-
FROM debian:bookworm-slim
1+
FROM debian:trixie-slim
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
# Install system dependencies
6-
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
# apt upgrade pulls security fixes past the base-image snapshot.
6+
# Fonts: the OFL families the Typst template falls through to (Lato, JetBrains
7+
# Mono, Carlito for Calibri, Liberation Sans for Arial, DejaVu mono).
8+
# python-is-python3: the workflows invoke bare `python`.
9+
# unzip: required by `quarto install chrome-headless-shell` (below) to extract.
10+
# rsync: github-pages-deploy-action shells out to it to sync the build.
11+
# lib* : runtime deps for chrome-headless-shell, which Quarto uses to
12+
# rasterize mermaid/dot diagrams during the Typst PDF render.
13+
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
714
wget \
8-
curl \
9-
sudo \
1015
git \
1116
bash \
12-
rsync \
1317
ca-certificates \
1418
python3 \
1519
python3-pip \
16-
fonts-dejavu \
20+
python-is-python3 \
21+
unzip \
22+
rsync \
23+
fonts-dejavu-core \
24+
fonts-lato \
25+
fonts-jetbrains-mono \
26+
fonts-crosextra-carlito \
27+
fonts-liberation2 \
1728
coreutils \
18-
procps \
19-
chromium \
20-
libreoffice-core \
21-
libreoffice-writer \
22-
libreoffice-java-common \
23-
default-jre-headless
29+
libnss3 libnspr4 libdbus-1-3 libglib2.0-0t64 libatk1.0-0t64 \
30+
libatk-bridge2.0-0t64 libatspi2.0-0t64 libcups2t64 libdrm2 libgbm1 \
31+
libxcb1 libx11-6 libxcomposite1 libxdamage1 libxext6 libxfixes3 \
32+
libxrandr2 libxkbcommon0 libasound2t64 libpango-1.0-0 libcairo2 && \
33+
apt-get clean && \
34+
rm -rf /var/lib/apt/lists/* \
35+
/usr/share/doc /usr/share/man /usr/share/locale \
36+
/var/cache/* /tmp/* /var/tmp/*
2437

2538

26-
# Install Quarto CLI
39+
# Install Quarto CLI.
40+
ENV QUARTO_VERSION=1.9.37
2741
RUN arch=$(dpkg --print-architecture) && \
2842
case "$arch" in \
29-
amd64) deb=quarto-1.7.30-linux-amd64.deb ;; \
30-
arm64) deb=quarto-1.7.30-linux-arm64.deb ;; \
31-
*) echo "Unsupported architecture: $arch" && exit 1 ;; \
43+
amd64) deb=quarto-${QUARTO_VERSION}-linux-amd64.deb ;; \
44+
arm64) deb=quarto-${QUARTO_VERSION}-linux-arm64.deb ;; \
45+
*) echo "Unsupported architecture: $arch" && exit 1 ;; \
3246
esac && \
33-
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.7.30/$deb && \
47+
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/$deb && \
3448
dpkg -i $deb && \
35-
rm $deb
36-
37-
# Install Node.js (for GitHub Actions written in Node)
38-
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
39-
apt-get install -y nodejs
40-
41-
# Clean up apt, pip, Python, and docs
42-
RUN apt-get clean && \
43-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
44-
python3 -m pip cache purge && \
45-
find /usr/local/lib/python3.*/ -name '__pycache__' -exec rm -r {} + && \
46-
find /usr/local/lib/python3.*/ -name '*.pyc' -delete && \
47-
rm -rf /root/.cache/pip /root/.cache/fontconfig && \
48-
rm -rf $HF_HOME/hub/tmp-* $HF_HOME/hub/*.lock $HF_HOME/hub/models--*/blobs &&\
49-
rm -rf /usr/share/doc /usr/share/man /usr/share/locale /var/cache/* /tmp/* /var/tmp/*
49+
rm $deb && \
50+
rm -rf /usr/share/doc /usr/share/man /tmp/* /var/tmp/*
51+
52+
# panflute -> inject_changelog.py filter
53+
# PyYAML -> strip_unknown_frontmatter.py + the AI scripts
54+
# google-genai -> helpers/gemini_client.py (LLM doc annotation, 2.x; uses
55+
# files.upload(file=), see gemini_client.py)
56+
# tiktoken -> token counting for the LLM rate limiter
57+
RUN pip install --no-cache-dir --break-system-packages \
58+
panflute PyYAML google-genai==2.6.0 tiktoken==0.13.0 && \
59+
python3 -m pip cache purge 2>/dev/null || true && \
60+
rm -rf /root/.cache /tmp/* /var/tmp/*
61+
62+
63+
# Pin Quarto's data dir to a fixed path so it finds chrome-headless-shell at
64+
# runtime regardless of $HOME. GitHub container jobs set HOME=/github/home,
65+
# which would otherwise hide this install and break the Typst diagram render.
66+
ENV XDG_DATA_HOME=/root/.local/share
67+
68+
# Headless browser Quarto uses to rasterize mermaid/dot diagrams during the
69+
# Typst PDF render. Needs unzip + the lib* packages installed above.
70+
RUN quarto install chrome-headless-shell && \
71+
rm -rf /root/.cache /tmp/* /var/tmp/*
72+
73+
# Fail the build early if the headless browser can't actually launch (e.g. a
74+
# missing runtime lib): render a trivial mermaid doc to PDF.
75+
RUN cd /tmp && \
76+
printf '```{mermaid}\nflowchart LR\n A --> B\n```\n' > smoke.qmd && \
77+
quarto render smoke.qmd --to typst -o smoke.pdf && \
78+
rm -rf /tmp/smoke* /root/.cache
5079

5180

5281
# Entrypoint script

.github/runners/entrypoint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Run whatever command the container is given; drop to a shell if none.
5+
if [ $# -eq 0 ]; then
6+
exec /bin/bash
7+
else
8+
exec "$@"
9+
fi

0 commit comments

Comments
 (0)