while I use Homebrew on macOS for the errant command line utility or library, I share your concern. I use the Universal Blue Silverblue variant for it's integrated Nvidia support with either mise-en-place[0], or the native toolbx[1] utility for isolated environments.
[0]https://mise.jdx.dev [1]https://containertoolbx.org