Automatic installation of latest drivers on Tooloop media server

I am developing an open source media server: www.tooloop.org
Some of the configurations include Quadro cards.

The system has a script to install additional features, e.g. the Nvidia driver.

I would love to get some feedback from knowledged Nvidia/Linux people whether I am doing something wrong in the script.
The code is here: https://github.com/vollstock/Tooloop-OS/blob/master/files/scripts/tooloop-install-optional-stuff#L69

Also for some reason I need to add a symlink from

/usr/lib/libGL.so.1

to

/usr/lib/libGL.so

Otherwise openframeworks wouldn’t compile. Is this a bug and if so, where should I report it? Or is openframeworks doing something wrong?

I think you should look into glvnd, both libs should be a link to the glvnd stub loader. Or do a non-glvnd install. All depends on the underlying distro.

well the problem was that openframework can’t link against the GL library as /usr/lib/libGL.so is missing. Adding a link to /usr/lib/libGL.so.1 solves that. I have opened an issue in the Nvidia installer on Github asking that question.
https://github.com/NVIDIA/nvidia-installer/issues/9

Anyway, apart from this, everything works just fine.

I’d still like to know whether my script is a good way to install the driver or if there’s a better option I am missing.

Thanks :-)

Since the underlying distro seems to be ubuntu, you’d better use the graphics ppa instead of the .run installer.

ah cool, this one?

sudo add-apt-repository ppa:graphics-drivers/ppa

From what I can tell you have to specify the version in

sudo apt install nvidia-VERSION

Is there a way to automatically select the latest long-lived driver?

Also it installs a huge(!) amount of stuff with it.
However, this seems to work fine:

sudo apt install --no-install-recommends nvidia-390 nvidia-settings

It depends on the gpu used. 340 and 390 are legacy drivers.
https://nvidia.custhelp.com/app/answers/detail/a_id/3142/~/support-timeframes-for-unix-legacy-gpu-releases
I don’t know exactly how Ubuntu handles this but I would expect if you install -340, it just upgrades within the -340 line of drivers likewise in the -390 line. -396 would then always upgrade to the next version using transitional packages.
Ubuntu just split the driver into tiny little pieces so there are so many packages installed. And it also installs one or two packages necessary for optimus type notebooks.