aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/Makefile1
-rw-r--r--misc/py-torchvision/Makefile34
-rw-r--r--misc/py-torchvision/distinfo3
-rw-r--r--misc/py-torchvision/pkg-descr2
4 files changed, 40 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 6cc050e71a62..16f377651edf 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -466,6 +466,7 @@
SUBDIR += py-tflite
SUBDIR += py-tflite-support
SUBDIR += py-toil
+ SUBDIR += py-torchvision
SUBDIR += py-tqdm
SUBDIR += py-tvm
SUBDIR += py-uhi
diff --git a/misc/py-torchvision/Makefile b/misc/py-torchvision/Makefile
new file mode 100644
index 000000000000..d45e7e51cadb
--- /dev/null
+++ b/misc/py-torchvision/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= torchvision
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.15.2-rc2
+CATEGORIES= misc # machine-learning
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= PyTorch: Datasets, transforms and models specific to computer vision
+WWW= https://pytorch.org/vision/stable/index.html
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+LIB_DEPENDS= libpng16.so:graphics/png
+PY_DEPENDS= ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}pillow>=5.3.0:graphics/py-pillow@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR}
+BUILD_DEPENDS= ${PY_DEPENDS}
+RUN_DEPENDS= ${PY_DEPENDS}
+
+USES= python
+USE_PYTHON= distutils autoplist
+
+USE_GITHUB= yes
+GH_ACCOUNT= pytorch
+GH_PROJECT= vision
+
+post-install: # strip binaries
+ @${STRIP_CMD} \
+ ${STAGEDIR}${PYTHON_SITELIBDIR}/torchvision/_C.so \
+ ${STAGEDIR}${PYTHON_SITELIBDIR}/torchvision/image.so
+
+.include <bsd.port.mk>
diff --git a/misc/py-torchvision/distinfo b/misc/py-torchvision/distinfo
new file mode 100644
index 000000000000..fcc27e3db54f
--- /dev/null
+++ b/misc/py-torchvision/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1683503135
+SHA256 (pytorch-vision-v0.15.2-rc2_GH0.tar.gz) = 415db127b72b5f2f3ea46f81b4cfcd49d97b72c0e2421bc6fcb6e9c80f634219
+SIZE (pytorch-vision-v0.15.2-rc2_GH0.tar.gz) = 13091064
diff --git a/misc/py-torchvision/pkg-descr b/misc/py-torchvision/pkg-descr
new file mode 100644
index 000000000000..ac92e7c23b1c
--- /dev/null
+++ b/misc/py-torchvision/pkg-descr
@@ -0,0 +1,2 @@
+The torchvision package consists of popular datasets, model architectures, and
+common image transformations for computer vision.