diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index ecf5b666a..8eb18905b 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -26,6 +26,16 @@ jobs: pip install -U "jax[cuda13]" pip install numpyro python scripts/test-jax-install.py + - name: Build matplotlib's font cache + shell: bash -l {0} + run: | + # On a freshly launched runner the first matplotlib import scans the + # system fonts from a cold disk, which can take over 5 s, and + # matplotlib then prints "Matplotlib is building the font cache; this + # may take a moment." into the output of the first notebook that + # imports it. Build the cache here, so no page depends on that timing: + # the font manager builds it on import, with no backend involved. + python -c "import matplotlib.font_manager" - name: Check nvidia drivers shell: bash -l {0} run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d3e5abb8..88f64be48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,16 @@ jobs: pip install -U "jax[cuda13]" pip install numpyro python scripts/test-jax-install.py + - name: Build matplotlib's font cache + shell: bash -l {0} + run: | + # On a freshly launched runner the first matplotlib import scans the + # system fonts from a cold disk, which can take over 5 s, and + # matplotlib then prints "Matplotlib is building the font cache; this + # may take a moment." into the output of the first notebook that + # imports it. Build the cache here, so no page depends on that timing: + # the font manager builds it on import, with no backend involved. + python -c "import matplotlib.font_manager" - name: Display Conda Environment Versions shell: bash -l {0} run: conda list diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 236c4b532..5efe21030 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,6 +43,16 @@ jobs: pip install -U "jax[cuda13]" pip install numpyro python scripts/test-jax-install.py + - name: Build matplotlib's font cache + shell: bash -l {0} + run: | + # On a freshly launched runner the first matplotlib import scans the + # system fonts from a cold disk, which can take over 5 s, and + # matplotlib then prints "Matplotlib is building the font cache; this + # may take a moment." into the output of the first notebook that + # imports it. Build the cache here, so no page depends on that timing: + # the font manager builds it on import, with no backend involved. + python -c "import matplotlib.font_manager" - name: Check nvidia drivers shell: bash -l {0} run: |