Image: ~900 MB lighter — uv cache, langpacks, docs, wallpapers, mypy out

Measured on the current image (3.29 GB): /root/.cache/uv held 266 MB
after sync (--no-cache now); glibc-langpack-* plus their /usr/lib and
/usr/share locale data ~460 MB (only en stays); /usr/share doc/man/info
+ wallpapers ~150 MB. mypy moved from the dev group to a types group
that the image does not install (uv sync --frozen --group tracker);
pytest and ruff stay because CI tests inside the product environment.
uv.lock relocked for the group change.
This commit is contained in:
0x1f6 committed 2026-10-06 02:23:39 +02:00
1 parent 8298754437
commit 302df6c2da
3 files changed
+19 -4

No files matched your search

+10 -2
View File
@@ -21,7 +21,11 @@ RUN dnf -y install --setopt=install_weak_deps=False \
# the KDE/Qt stack has no PyPI wheels, so it stays a dnf package
python3-pyside6 kf6-kirigami kf6-qqc2-desktop-style qt6-qtwayland \
breeze-icon-theme plasma-breeze krdp freerdp tigervnc-x11-server xrandr \
&& dnf clean all
&& dnf -y remove 'glibc-langpack-*' \
&& dnf -y install glibc-langpack-en \
&& dnf clean all \
&& rm -rf /usr/share/doc/* /usr/share/man/* /usr/share/info/* \
/usr/share/wallpapers
# uv, pinned. Python dependencies come from the committed uv.lock, not from
# whatever PyPI serves on build day.
@@ -47,7 +51,11 @@ RUN install -d /opt/frametop/include /opt/frametop/lib \
# variable comes first so the venv lands in /opt/frametop/venv.
ENV UV_PROJECT_ENVIRONMENT=/opt/frametop/venv
COPY pyproject.toml uv.lock .python-version /src/frametop/
RUN cd /src/frametop && uv sync --frozen --all-groups
# uv sync --frozen --group tracker: the default groups (dev: pytest/ruff for
# CI's in-image tests; tracker: the hand tracker's stack) plus the tracker —
# the `types` group (mypy) stays out. --no-cache keeps uv's download cache
# out of the image.
RUN cd /src/frametop && uv sync --frozen --group tracker --no-cache
# The sources, then the binaries (built as the Frame-side build scripts build
# them; outputs go to /opt/frametop/bin). Hand tracking is deferred exactly as
+5
View File
@@ -14,6 +14,11 @@ dev = [
"pytest>=8",
"ruff>=0.14",
"pyflakes>=3.4",
]
# type checking is dev tooling outside the image: the image installs the
# default groups (dev for CI's pytest/ruff, tracker for the hand tracker)
# but not this one
types = [
"mypy>=1.19",
]
tracker = [
Generated
+4 -2
View File
@@ -117,7 +117,6 @@ source = { virtual = "." }
[package.dev-dependencies]
dev = [
{ name = "mypy" },
{ name = "pyflakes" },
{ name = "pytest" },
{ name = "ruff" },
@@ -127,12 +126,14 @@ tracker = [
{ name = "numpy" },
{ name = "opencv-python-headless" },
]
types = [
{ name = "mypy" },
]
[package.metadata]
[package.metadata.requires-dev]
dev = [
{ name = "mypy", specifier = ">=1.19" },
{ name = "pyflakes", specifier = ">=3.4" },
{ name = "pytest", specifier = ">=8" },
{ name = "ruff", specifier = ">=0.14" },
@@ -142,6 +143,7 @@ tracker = [
{ name = "numpy", specifier = ">=2.2" },
{ name = "opencv-python-headless", specifier = ">=4.11" },
]
types = [{ name = "mypy", specifier = ">=1.19" }]
[[package]]
name = "fsspec"