aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2024-04-27 00:45:56 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2024-04-27 01:42:39 +0000
commitdc61470677e1276f07b4a902a7e3b127e8739d72 (patch)
tree688a41003d88256cd63267562e56086dc0578643
parente9f2c79f7cf70864008cb737ac8059827d87a91f (diff)
downloadports-dc61470677e1276f07b4a902a7e3b127e8739d72.tar.gz
ports-dc61470677e1276f07b4a902a7e3b127e8739d72.zip
misc/py-accelerate: New port: PyTorch: simple way to launch, train, use PyTorch models on any device
-rw-r--r--misc/Makefile1
-rw-r--r--misc/py-accelerate/Makefile31
-rw-r--r--misc/py-accelerate/distinfo3
-rw-r--r--misc/py-accelerate/pkg-descr3
4 files changed, 38 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index c3132eeab21f..2f2339470284 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -400,6 +400,7 @@
SUBDIR += py-SQSnobFit
SUBDIR += py-SimpleSoapy
SUBDIR += py-SoapySDR
+ SUBDIR += py-accelerate
SUBDIR += py-alive-progress
SUBDIR += py-apache-beam
SUBDIR += py-ascii-magic
diff --git a/misc/py-accelerate/Makefile b/misc/py-accelerate/Makefile
new file mode 100644
index 000000000000..33b4d9973601
--- /dev/null
+++ b/misc/py-accelerate/Makefile
@@ -0,0 +1,31 @@
+PORTNAME= accelerate
+DISTVERSION= 0.29.3
+CATEGORIES= misc # machine-learning
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= PyTorch: simple way to launch, train, use PyTorch models on any device
+WWW= https://huggingface.co/docs/accelerate/index
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}huggingface-hub>0:misc/py-huggingface-hub@${PY_FLAVOR} \
+ ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}packaging>=20.0:devel/py-packaging@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}safetensors>=0.3.1:misc/py-safetensors@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}parameterized>0:devel/py-parameterized@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}torchvision>0:misc/py-torchvision@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= pep517 autoplist pytest # tests fail because they depend on the module 'transformers' that depends on 'accelerate' and isn't yet ported
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-accelerate/distinfo b/misc/py-accelerate/distinfo
new file mode 100644
index 000000000000..f94fa499a48a
--- /dev/null
+++ b/misc/py-accelerate/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1714171436
+SHA256 (accelerate-0.29.3.tar.gz) = 1a5a845b06b24b41736b219b2b20fd021ca5dff4070a252445fd6de736e347ac
+SIZE (accelerate-0.29.3.tar.gz) = 295357
diff --git a/misc/py-accelerate/pkg-descr b/misc/py-accelerate/pkg-descr
new file mode 100644
index 000000000000..b86585b66d26
--- /dev/null
+++ b/misc/py-accelerate/pkg-descr
@@ -0,0 +1,3 @@
+The accelerate module was created for PyTorch users who like to write the
+training loop of PyTorch models but are reluctant to write and maintain the
+boilerplate code needed to use multi-GPUs/TPU/fp16.