git: c1a242e041db - main - misc/py-modelscope: New port: Model-as-a-Service platform for AI model inference and training

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Fri, 19 Jun 2026 06:37:06 UTC
The branch main has been updated by yuri:

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

commit c1a242e041dbaae29f07c22b02d5c1e1afbb271b
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-06-19 04:09:18 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-06-19 06:36:58 +0000

    misc/py-modelscope: New port: Model-as-a-Service platform for AI model inference and training
---
 misc/Makefile                                 |  1 +
 misc/py-modelscope/Makefile                   | 29 +++++++++++++++++++++++++++
 misc/py-modelscope/distinfo                   |  3 +++
 misc/py-modelscope/files/patch-pyproject.toml | 25 +++++++++++++++++++++++
 misc/py-modelscope/pkg-descr                  |  4 ++++
 5 files changed, 62 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index 9079d71ce71e..d872be263671 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -550,6 +550,7 @@
     SUBDIR += py-mmengine
     SUBDIR += py-mmsegmentation
     SUBDIR += py-model-hosting-container-standards
+    SUBDIR += py-modelscope
     SUBDIR += py-molequeue
     SUBDIR += py-napari
     SUBDIR += py-napari-svg
diff --git a/misc/py-modelscope/Makefile b/misc/py-modelscope/Makefile
new file mode 100644
index 000000000000..6640014087a7
--- /dev/null
+++ b/misc/py-modelscope/Makefile
@@ -0,0 +1,29 @@
+PORTNAME=	modelscope
+PORTVERSION=	1.37.1
+CATEGORIES=	misc python # machine-learning
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Model-as-a-Service platform for AI model inference and training
+WWW=		https://www.modelscope.cn/home \
+		https://github.com/modelscope/modelscope
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}filelock>0:sysutils/py-filelock@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}requests>=2.25:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tqdm>=4.64.0:misc/py-tqdm@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}urllib3>=1.26:net/py-urllib3@${PY_FLAVOR} # from requirements/hub.txt, but there are other requirements files as well
+
+USES=		python
+USE_PYTHON=	pep517 concurrent autoplist
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-modelscope/distinfo b/misc/py-modelscope/distinfo
new file mode 100644
index 000000000000..4305fef05909
--- /dev/null
+++ b/misc/py-modelscope/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1781832793
+SHA256 (modelscope-1.37.1.tar.gz) = 7d9124970b4e53639bebe89f60473dee7d5a80589bf35bfbef4c839933cdaf93
+SIZE (modelscope-1.37.1.tar.gz) = 4594233
diff --git a/misc/py-modelscope/files/patch-pyproject.toml b/misc/py-modelscope/files/patch-pyproject.toml
new file mode 100644
index 000000000000..807db916bd87
--- /dev/null
+++ b/misc/py-modelscope/files/patch-pyproject.toml
@@ -0,0 +1,25 @@
+-- Fix pyproject.toml for compatibility with setuptools 63.1.0:
+-- - Convert license string to PEP 621 table format.
+-- - Remove license-files property (not supported by setuptools<69).
+-- - Lower setuptools build requirement from >=69 to >=63.1.0.
+--- pyproject.toml.orig	2026-05-22 05:56:16 UTC
++++ pyproject.toml
+@@ -3,8 +3,7 @@ readme = {file = "README.md", content-type = "text/mar
+ dynamic = ["version", "dependencies", "optional-dependencies"]
+ description = "ModelScope: bring the notion of Model-as-a-Service to life."
+ readme = {file = "README.md", content-type = "text/markdown"}
+-license = "Apache-2.0"
+-license-files = ["LICENSE"]
++license = {text = "Apache-2.0"}
+ authors = [
+   {name = "ModelScope team"},
+   {email = "contact@modelscope.cn"}
+@@ -28,7 +27,7 @@ ms = "modelscope.cli.cli:run_cmd"
+ ms = "modelscope.cli.cli:run_cmd"
+ 
+ [build-system]
+-requires = ["setuptools>=69", "wheel"]
++requires = ["setuptools>=63.1.0", "wheel"]
+ build-backend = "setuptools.build_meta"
+ 
+ [tool.setuptools]
diff --git a/misc/py-modelscope/pkg-descr b/misc/py-modelscope/pkg-descr
new file mode 100644
index 000000000000..b0d6db2f21fb
--- /dev/null
+++ b/misc/py-modelscope/pkg-descr
@@ -0,0 +1,4 @@
+ModelScope is a Model-as-a-Service (MaaS) platform that brings together
+advanced machine learning models from the AI community. It provides
+unified interfaces for model inference, training, and evaluation across
+CV, NLP, Speech, Multi-Modality, and Scientific-computation domains.