feat: upgrade to Python 3.13, arm64 base to Ubuntu 26.04

All platforms now use Python 3.13. amd64 installs via deadsnakes PPA on
the Ubuntu 22.04 CUDA base; arm64 gets Python 3.13 natively from Ubuntu
26.04. Verified cp313 wheels exist for onnxruntime-gpu 1.26.0 and
torch 2.12.0+cu126. uv.lock regenerated under CPython 3.13.5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 04:18:50 +00:00
co-authored by Claude Sonnet 4.6
parent 67b05502b3
commit 34d4780554
7 changed files with 402 additions and 348 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
uses: astral-sh/setup-uv@v7 uses: astral-sh/setup-uv@v7
- name: Set up Python - name: Set up Python
run: uv python install 3.12 run: uv python install 3.13
- name: Install dependencies - name: Install dependencies
run: uv sync --all-extras run: uv sync --all-extras
+1 -1
View File
@@ -28,7 +28,7 @@ jobs:
uses: astral-sh/setup-uv@v7 uses: astral-sh/setup-uv@v7
- name: Set up Python - name: Set up Python
run: uv python install 3.12 run: uv python install 3.13
- name: Regenerate lockfile - name: Regenerate lockfile
run: uv lock run: uv lock
+1 -1
View File
@@ -1 +1 @@
3.12 3.13
+10
View File
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.2.4] - 2026-06-12
### Changed
- **Python 3.13 across all platforms**: bumped from 3.12 to 3.13. amd64 installs Python 3.13 from the deadsnakes PPA on the Ubuntu 22.04 CUDA base; arm64 uses the Python 3.13 package available natively in Ubuntu 26.04. All confirmed dependencies (`insightface 1.0.1`, `onnxruntime-gpu 1.26.0`, `torch 2.12.0+cu126`) have Python 3.13 wheels.
- **arm64 base: Ubuntu 26.04**: Python 3.12 was removed from Ubuntu 26.04's default repos; upgrading the base pulls Python 3.13 without a PPA.
- **`requires-python = ">=3.13"`** and `target-version = "py313"` updated in `pyproject.toml`.
- **CI updated to Python 3.13**: `test.yml` and `update-lockfile.yml` now install Python 3.13.
- **`uv.lock` regenerated** for Python 3.13.5.
## [0.2.3] - 2026-06-12 ## [0.2.3] - 2026-06-12
### Fixed ### Fixed
+10 -10
View File
@@ -1,6 +1,6 @@
# ── Platform-conditional base ───────────────────────────────────────────── # ── Platform-conditional base ─────────────────────────────────────────────
# amd64: NVIDIA CUDA 12.6 (GPU acceleration when available, CPU fallback) # amd64: NVIDIA CUDA 12.6 (GPU acceleration when available, CPU fallback)
# arm64: Ubuntu 26.04 (CPU-only; Python 3.12 native — no PPA needed) # arm64: Ubuntu 26.04 (CPU-only; no CUDA on ARM)
FROM --platform=$BUILDPLATFORM nvidia/cuda:12.9.2-cudnn-runtime-ubuntu22.04 AS base-amd64 FROM --platform=$BUILDPLATFORM nvidia/cuda:12.9.2-cudnn-runtime-ubuntu22.04 AS base-amd64
FROM --platform=$BUILDPLATFORM ubuntu:26.04 AS base-arm64 FROM --platform=$BUILDPLATFORM ubuntu:26.04 AS base-arm64
@@ -12,8 +12,8 @@ FROM base-${TARGETARCH} AS build
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# amd64 (Ubuntu 22.04 CUDA base): Python 3.12 via deadsnakes PPA # amd64 (Ubuntu 22.04 CUDA base): Python 3.13 via deadsnakes PPA
# arm64 (Ubuntu 24.04): Python 3.12 is native — skip PPA entirely # arm64 (Ubuntu 26.04): Python 3.13 available natively in repos
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
curl \ curl \
@@ -23,10 +23,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get update; \ && apt-get update; \
fi \ fi \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
python3.12 python3.12-venv python3.12-dev \ python3.13 python3.13-venv python3.13-dev \
libgl1 libglib2.0-0 libxext6 g++ \ libgl1 libglib2.0-0 libxext6 g++ \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/bin/python3.12 /usr/bin/python3 && ln -sf /usr/bin/python3.13 /usr/bin/python3
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \ RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& cp /root/.local/bin/uv /usr/local/bin/uv && cp /root/.local/bin/uv /usr/local/bin/uv
@@ -43,7 +43,7 @@ RUN chmod +x /app/entrypoint.sh
# ── Runtime stage ───────────────────────────────────────────────────────── # ── Runtime stage ─────────────────────────────────────────────────────────
# Starts fresh from the base image — excludes build tools (g++, # Starts fresh from the base image — excludes build tools (g++,
# python3.12-dev, curl, gnupg) that are not needed at runtime. # python3.13-dev, curl, gnupg) that are not needed at runtime.
FROM base-${TARGETARCH} AS runtime FROM base-${TARGETARCH} AS runtime
@@ -58,18 +58,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get update; \ && apt-get update; \
fi \ fi \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
python3.12 python3.12-venv \ python3.13 python3.13-venv \
libgl1 libglib2.0-0 libxext6 \ libgl1 libglib2.0-0 libxext6 \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/bin/python3.12 /usr/bin/python3 && ln -sf /usr/bin/python3.13 /usr/bin/python3
# Copy app (with .venv) and uv from build stage # Copy app (with .venv) and uv from build stage
COPY --from=build /app /app COPY --from=build /app /app
COPY --from=build /usr/local/bin/uv /usr/local/bin/uv COPY --from=build /usr/local/bin/uv /usr/local/bin/uv
# Expose CUDA/cuDNN libraries from pip packages so onnxruntime-gpu # Expose CUDA/cuDNN libraries from pip packages so onnxruntime-gpu
# can find libcublasLt.so.12 and libcudnn.so.9 at runtime # can find libcublasLt.so.12 and libcudnn.so.9 at runtime (amd64 only)
ENV LD_LIBRARY_PATH="/app/.venv/lib/python3.12/site-packages/nvidia/cudnn/lib:/app/.venv/lib/python3.12/site-packages/nvidia/cuda_runtime/lib:${LD_LIBRARY_PATH}" ENV LD_LIBRARY_PATH="/app/.venv/lib/python3.13/site-packages/nvidia/cudnn/lib:/app/.venv/lib/python3.13/site-packages/nvidia/cuda_runtime/lib:${LD_LIBRARY_PATH}"
RUN groupadd -g 568 apps && useradd -u 568 -g apps -m -s /bin/bash appuser \ RUN groupadd -g 568 apps && useradd -u 568 -g apps -m -s /bin/bash appuser \
&& mkdir -p /models/.insightface /models/huggingface \ && mkdir -p /models/.insightface /models/huggingface \
+12 -6
View File
@@ -1,22 +1,22 @@
[project] [project]
name = "winnow" name = "winnow"
version = "0.2.3" version = "0.2.4"
description = "Immich to Frigate training sets" description = "Immich to Frigate training sets"
license = "MIT" license = "MIT"
requires-python = ">=3.12" requires-python = ">=3.13"
authors = [{ name = "Holden Salomon", email = "holden@arch.fyi" }] authors = [{ name = "Holden Salomon", email = "holden@arch.fyi" }]
keywords = ["immich", "frigate", "face-recognition", "training-data", "arcface", "insightface"] keywords = ["immich", "frigate", "face-recognition", "training-data", "arcface", "insightface"]
classifiers = [ classifiers = [
"Development Status :: 3 - Alpha", "Development Status :: 3 - Alpha",
"Intended Audience :: Developers", "Intended Audience :: Developers",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Image Recognition", "Topic :: Scientific/Engineering :: Image Recognition",
] ]
dependencies = [ dependencies = [
"croniter>=5.0.2", "croniter>=5.0.2",
"insightface>=0.7.3", "insightface>=0.7.3",
"nvidia-cudnn-cu12>=9.23.1.3", "nvidia-cudnn-cu12>=9.0.0",
"numpy>=2.2.6", "numpy>=2.2.6",
"onnxruntime-gpu>=1.23.2", "onnxruntime-gpu>=1.23.2",
"opencv-python-headless>=4.12.0.88", "opencv-python-headless>=4.12.0.88",
@@ -24,7 +24,8 @@ dependencies = [
"python-dotenv>=1.2.1", "python-dotenv>=1.2.1",
"requests>=2.32.5", "requests>=2.32.5",
"rich>=14.2.0", "rich>=14.2.0",
"torch>=2.6.0", "torch>=2.12.0",
"torchvision>=0.27.0",
"transformers>=4.57.6", "transformers>=4.57.6",
"ultralytics>=8.4.66", "ultralytics>=8.4.66",
] ]
@@ -44,6 +45,11 @@ torch = [
{ index = "pytorch-cpu", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" }, { index = "pytorch-cpu", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
{ index = "pytorch-cpu", marker = "sys_platform != 'linux'" }, { index = "pytorch-cpu", marker = "sys_platform != 'linux'" },
] ]
torchvision = [
{ index = "pytorch-cu126", marker = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
{ index = "pytorch-cpu", marker = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
{ index = "pytorch-cpu", marker = "sys_platform != 'linux'" },
]
[[tool.uv.index]] [[tool.uv.index]]
name = "pytorch-cu126" name = "pytorch-cu126"
@@ -66,7 +72,7 @@ packages = ["winnow"]
[tool.ruff] [tool.ruff]
line-length = 120 line-length = 120
target-version = "py312" target-version = "py313"
[tool.ruff.lint] [tool.ruff.lint]
select = ["E", "F", "I"] select = ["E", "F", "I"]
Generated
+367 -329
View File
File diff suppressed because it is too large Load Diff