git: 097726a87789 - main - science/linux-ai-ml-env: Remove dependency on nvidia-driver
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 Oct 2026 16:17:27 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=097726a8778942d757d2ce39c3df74ba780261f3
commit 097726a8778942d757d2ce39c3df74ba780261f3
Author: Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2026-10-08 16:10:23 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2026-10-08 16:17:19 +0000
science/linux-ai-ml-env: Remove dependency on nvidia-driver
Instead, ask user to install it via pkg-message. This allows choosing between
nvidia-driver and nvidia-driver-devel, until we get provides/requires.
PR: 291139
---
science/linux-ai-ml-env/Makefile | 23 +++++------------------
science/linux-ai-ml-env/files/ai-ml-env-bash.in | 2 +-
science/linux-ai-ml-env/pkg-message | 8 ++++----
science/linux-ai-ml-env/pkg-plist | 3 +++
4 files changed, 13 insertions(+), 23 deletions(-)
diff --git a/science/linux-ai-ml-env/Makefile b/science/linux-ai-ml-env/Makefile
index 8b50992f0770..37e840df35fe 100644
--- a/science/linux-ai-ml-env/Makefile
+++ b/science/linux-ai-ml-env/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ai-ml-env
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= science linux
MASTER_SITES= https://arrowd.name/
PKGNAMEPREFIX= linux-
@@ -18,8 +19,7 @@ LICENSE_PERMS= dist-mirror pkg-mirror auto-accept
BUILD_DEPENDS= gmd5sum:sysutils/coreutils \
linux-rl9-devtools>=0:devel/linux-rl9-devtools
-RUN_DEPENDS= linux-rl9-python${PYTHON_SUFFIX}>=0:lang/linux-rl9-python3 \
- ${NVIDIA_DEPS}
+RUN_DEPENDS= linux-rl9-python${PYTHON_SUFFIX}>=0:lang/linux-rl9-python3
USES= linux:rl9
USE_LINUX_PREFIX= yes
@@ -36,31 +36,18 @@ BINARY_ALIAS= md5sum=gmd5sum
SUB_FILES= ai-ml-env-bash \
ai-ml-env-python
SUB_LIST= LOCALBASE=${LOCALBASE} \
- LINUXBASE=${LINUXBASE}
+ LINUXBASE=${LINUXBASE} \
+ PYTHON_VER=${PYTHON_VER}
PLIST_SUB= PYTHON_SUFFIX=${PYTHON_SUFFIX} \
PYTHON_VER=${PYTHON_VER}
CONDA_VERSION= py${PYTHON_SUFFIX}_25.9.1-1
CONDA_SCRIPT= Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh
-PYTHON_SUFFIX= 39
+PYTHON_SUFFIX= ${PYTHON_VER:S/.//}
PYTHON_VER= 3.9
DATA_DIR= ${LOCALBASE}/share/${PORTNAME}
-OPTIONS_DEFINE= NVIDIA_DEVEL
-
-NVIDIA_DEVEL_DESC= Depend on x11/nvidia-driver-devel instead of the stable version
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MNVIDIA_DEVEL}
-NVIDIA_DEPS= linux-nvidia-libs-devel>=0:x11/linux-nvidia-libs-devel \
- nvidia-driver-devel>=0:x11/nvidia-driver-devel
-.else
-NVIDIA_DEPS= linux-nvidia-libs>=0:x11/linux-nvidia-libs \
- nvidia-driver>=0:x11/nvidia-driver
-.endif
-
makedist: create-binary-alias
@${MKDIR} ${MAKEDIST_WRKSRC}
@${ECHO_MSG} "Setting up Miniconda 'pytorch' environment"
diff --git a/science/linux-ai-ml-env/files/ai-ml-env-bash.in b/science/linux-ai-ml-env/files/ai-ml-env-bash.in
index cae2b877705b..8ba9023084ab 100644
--- a/science/linux-ai-ml-env/files/ai-ml-env-bash.in
+++ b/science/linux-ai-ml-env/files/ai-ml-env-bash.in
@@ -1,6 +1,6 @@
#!/bin/sh
export LD_PRELOAD=%%LINUXBASE%%/usr/share/ai-ml-env/dummy-uvm.so
-export SSL_CERT_FILE=%%LINUXBASE%%/usr/lib/python3.9/site-packages/certifi/cacert.pem
+export SSL_CERT_FILE=%%LINUXBASE%%/usr/lib/python%%PYTHON_VER%%/site-packages/certifi/cacert.pem
exec %%LINUXBASE%%/usr/bin/bash $*
diff --git a/science/linux-ai-ml-env/pkg-message b/science/linux-ai-ml-env/pkg-message
index e8f01bd37e44..5cf167ffcfb2 100644
--- a/science/linux-ai-ml-env/pkg-message
+++ b/science/linux-ai-ml-env/pkg-message
@@ -1,9 +1,9 @@
[
{ type: install
message: <<EOM
-To utilize CUDA support for PyTorch, both https://github.com/shkhln 's
-compatibility library preloading and Linux compatibility layer usage are
-required, as demonstrated in the provided demonstration scripts.
+To utilize CUDA support, make sure that appropriate NVidia drivers are installed:
+
+ pkg install linux-nvidia-libs nvidia-driver
To play with Stable Diffusion copy it to a user-writable directory, edit at will
and launch it via ai-ml-env-python:
@@ -23,7 +23,7 @@ and then launch the entry point script via ai-ml-env-bash:
You can then run
-ai-ml-env-bash ./run_python_examples.sh clean
+ ai-ml-env-bash ./run_python_examples.sh clean
to remove downloaded data or just remove the whole directory to clean up
everything.
diff --git a/science/linux-ai-ml-env/pkg-plist b/science/linux-ai-ml-env/pkg-plist
index a0da7f0793eb..f8bdd99e4eb7 100644
--- a/science/linux-ai-ml-env/pkg-plist
+++ b/science/linux-ai-ml-env/pkg-plist
@@ -6,6 +6,7 @@ usr/bin/accelerate-merge-weights
usr/bin/diffusers-cli
usr/bin/f2py
usr/bin/fonttools
+usr/bin/hf
usr/bin/huggingface-cli
usr/bin/isympy
usr/bin/normalizer
@@ -14,9 +15,11 @@ usr/bin/proton
usr/bin/proton-viewer
usr/bin/pyftmerge
usr/bin/pyftsubset
+usr/bin/tiny-agents
usr/bin/torchfrtrace
usr/bin/torchrun
usr/bin/tqdm
+usr/bin/transformers
usr/bin/transformers-cli
usr/bin/ttx
%%DATADIR%%/dummy-uvm.so