NVIDIA GPU on a docker headless system - eviltoast

Hi there! I have an old pc that I use as a server (I use Ubuntu Server) and I would like to add a NVIDIA 1050 to it (for jellyfin and guacamole).

In the past I tried to do it and somehow I corrupted the system when installing the video drivers, I have always had complications when installing NVIDIA drivers on Linux.

Could any of you help me know what is the right way to install the video drivers on a headless system and use it correctly with docker compose?

Thanks in advance 😄