It’s a tradeoff. Bundling is easier for users as they don’t have to manage dependencies. You can see what a pain this is from something like the Tensorflow install instructions. Bundling is wasteful in that it can lead to multiple installs of the same software.
Given that our users aren’t unix sysadmins for the most part, I tried to err on the side of making it as easy as possible for them to install things. So we bundle the OS libraries on which we depend into Stan. You don’t have to use them for PyStan if it’s easier to do some other way.
For CmdStan: bundled, but you can use a command-line directive to use a different version than the bundled ones
For RStan: bundled (has to be for CRAN), but also has the option of pointing to different library version
Because CRAN forces RStan to remain consistent with the CRAN BH package (Boost headers), it really restricts what we can do. This is the main drawback with forced external linkage. But it’s not an intrinsic property of external package management.
Lots of packages on GitHub include other packages as submodules because Git makes that easy.
Obviously there’s a trend toward bundling with things like Docker (but I believe you can have a partial Docker image that links externally).
Tensorflow uses external dependencies, so their instructions on how to deal with all the management that entails is rather long: https://www.tensorflow.org/versions/r0.12/get_started/os_setup
We’ll be going down that route for MPI and GPUs, I’m pretty sure.
Hmm—looks like Tenosrflow only works with Nvidia GPUs, just like MxNet.