Skip to content

Commit 2bc2ab6

Browse files
committed
Pin fontbuilder image deps via uv-managed requirements.txt
Replace the unpinned pip3 install of scikit-image/scipy/matplotlib/parse with a uv-compiled lockfile. The Dockerfile installs from the lockfile, so layer-cache eviction can no longer silently pull newer matplotlib versions and shift gen_charmap.py output. The pinned versions match what the previously-cached fontbuilder image was already running, so no sample regeneration is required and the font/sample diff against master is empty. Direct deps live in requirements.in; the lockfile is produced by: uv pip compile xkcd-script/generator/requirements.in \ -o xkcd-script/generator/requirements.txt --python-version 3.12 To upgrade a dep, edit requirements.in (or pass --upgrade-package) and re-run the compile.
1 parent c677059 commit 2bc2ab6

3 files changed

Lines changed: 95 additions & 2 deletions

File tree

xkcd-script/generator/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
99
python3-pip \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
RUN pip3 install --break-system-packages \
13-
scikit-image scipy matplotlib parse
12+
# Direct deps are listed in requirements.in; requirements.txt is a fully
13+
# resolved lockfile produced by `uv pip compile`. Regenerate after editing
14+
# requirements.in:
15+
# uv pip compile xkcd-script/generator/requirements.in \
16+
# -o xkcd-script/generator/requirements.txt --python-version 3.12
17+
COPY requirements.txt /tmp/requirements.txt
18+
RUN pip3 install --break-system-packages -r /tmp/requirements.txt
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
scikit-image
2+
scipy
3+
matplotlib
4+
parse
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile xkcd-script/generator/requirements.in -o xkcd-script/generator/requirements.txt --python-version 3.12 --constraint /tmp/oldpins.txt
3+
contourpy==1.3.3
4+
# via
5+
# -c /tmp/oldpins.txt
6+
# matplotlib
7+
cycler==0.12.1
8+
# via
9+
# -c /tmp/oldpins.txt
10+
# matplotlib
11+
fonttools==4.62.1
12+
# via
13+
# -c /tmp/oldpins.txt
14+
# matplotlib
15+
imageio==2.37.3
16+
# via
17+
# -c /tmp/oldpins.txt
18+
# scikit-image
19+
kiwisolver==1.5.0
20+
# via
21+
# -c /tmp/oldpins.txt
22+
# matplotlib
23+
lazy-loader==0.5
24+
# via
25+
# -c /tmp/oldpins.txt
26+
# scikit-image
27+
matplotlib==3.10.9
28+
# via
29+
# -c /tmp/oldpins.txt
30+
# -r xkcd-script/generator/requirements.in
31+
networkx==3.6.1
32+
# via
33+
# -c /tmp/oldpins.txt
34+
# scikit-image
35+
numpy==2.4.4
36+
# via
37+
# -c /tmp/oldpins.txt
38+
# contourpy
39+
# imageio
40+
# matplotlib
41+
# scikit-image
42+
# scipy
43+
# tifffile
44+
packaging==26.2
45+
# via
46+
# -c /tmp/oldpins.txt
47+
# lazy-loader
48+
# matplotlib
49+
# scikit-image
50+
parse==1.22.0
51+
# via
52+
# -c /tmp/oldpins.txt
53+
# -r xkcd-script/generator/requirements.in
54+
pillow==12.2.0
55+
# via
56+
# -c /tmp/oldpins.txt
57+
# imageio
58+
# matplotlib
59+
# scikit-image
60+
pyparsing==3.3.2
61+
# via
62+
# -c /tmp/oldpins.txt
63+
# matplotlib
64+
python-dateutil==2.9.0.post0
65+
# via
66+
# -c /tmp/oldpins.txt
67+
# matplotlib
68+
scikit-image==0.26.0
69+
# via
70+
# -c /tmp/oldpins.txt
71+
# -r xkcd-script/generator/requirements.in
72+
scipy==1.17.1
73+
# via
74+
# -c /tmp/oldpins.txt
75+
# -r xkcd-script/generator/requirements.in
76+
# scikit-image
77+
six==1.17.0
78+
# via
79+
# -c /tmp/oldpins.txt
80+
# python-dateutil
81+
tifffile==2026.5.2
82+
# via
83+
# -c /tmp/oldpins.txt
84+
# scikit-image

0 commit comments

Comments
 (0)