git: c40cf98ecc1e - main - misc/py-immich-model: Add New Port

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Sat, 24 Oct 2026 20:02:21 UTC
The branch main has been updated by joneum:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c40cf98ecc1e954f7d9051de773a60962f8506ef

commit c40cf98ecc1e954f7d9051de773a60962f8506ef
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2026-10-24 19:59:18 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-10-24 20:01:48 +0000

    misc/py-immich-model: Add New Port
    
    The model runtime that Immich's machine learning service loads at inference
    time: the ONNX graph lowerings for the CLIP and face recognition models, the
    per execution provider variants of them, and the catalogue that maps a model
    name to its files.
    
    The exporter and benchmarking tools from the same source tree are not
    installed; they pull in PyTorch and are only needed to regenerate the models.
    
    Sponsored by:   Netzkommune GmbH
---
 misc/Makefile                  |  1 +
 misc/py-immich-model/Makefile  | 30 ++++++++++++++++++++++++++++++
 misc/py-immich-model/distinfo  |  3 +++
 misc/py-immich-model/pkg-descr |  7 +++++++
 4 files changed, 41 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index beebd6454e38..f9efecf125bd 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -538,6 +538,7 @@
     SUBDIR += py-ibm-cos-sdk-s3transfer
     SUBDIR += py-ibm-watsonx-ai
     SUBDIR += py-icoextract
+    SUBDIR += py-immich-model
     SUBDIR += py-insightface
     SUBDIR += py-instructor
     SUBDIR += py-ipyfastscape
diff --git a/misc/py-immich-model/Makefile b/misc/py-immich-model/Makefile
new file mode 100644
index 000000000000..a39387835c87
--- /dev/null
+++ b/misc/py-immich-model/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	immich-model
+DISTVERSION=	0.2.0
+CATEGORIES=	misc python
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	joneum@FreeBSD.org
+COMMENT=	Runtime for the machine learning models used by Immich
+WWW=		https://github.com/immich-app/ml-models
+
+LICENSE=	AGPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=1.26:math/py-numpy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}onnx>=1.16.1:misc/py-onnx@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}onnx-ir>=0.2.1:misc/py-onnx-ir@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}onnxscript>=0.7.0:misc/py-onnxscript@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}safetensors>=0.7:misc/py-safetensors@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist pep517
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	immich-app
+GH_PROJECT=	ml-models
+GH_TAGNAME=	8bf3fd1b44b0
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-immich-model/distinfo b/misc/py-immich-model/distinfo
new file mode 100644
index 000000000000..dc6fd96f6b62
--- /dev/null
+++ b/misc/py-immich-model/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1792861196
+SHA256 (immich-app-ml-models-0.2.0-8bf3fd1b44b0_GH0.tar.gz) = 56a1352b8125a9afb2b1fc2f70d9a5092e97c45215cb00cbd8cb423c7ee4e18a
+SIZE (immich-app-ml-models-0.2.0-8bf3fd1b44b0_GH0.tar.gz) = 1784907
diff --git a/misc/py-immich-model/pkg-descr b/misc/py-immich-model/pkg-descr
new file mode 100644
index 000000000000..0fcb3792d9ba
--- /dev/null
+++ b/misc/py-immich-model/pkg-descr
@@ -0,0 +1,7 @@
+This is the model runtime that the Immich machine learning service loads at
+inference time.  It holds the ONNX graph lowerings for Immich's CLIP and face
+recognition models, the per-execution-provider variants of them, and the
+model catalogue that maps a model name to its files.
+
+The exporter and benchmarking tools that live in the same source tree are not
+installed; they pull in PyTorch and are only needed to regenerate the models.