There is your issue:
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["<REMOVED>"]
}
EOF
The Nvidia Driver adds a custom daemon.json which you basically overwrite.
You have to ensure that this is also in there:
{
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
}
}
BTW, you have a lot of custom things in your go file, are you sure that everything is necessary:
/etc/rc.d/rc.nginx reload
# Enlarge the LOG partition (because Dynamix System Stats needs at least 186Mb, default LOG is 128Mb)
mount -o remount,size=384m /var/log
May I ask why do you reload nginx right after it is started?
I'm also glad to see that you bought unRAID but please remove that:
/boot/config
-rw------- 1 root root 256 May 25 2020 BTRS.key
You also have some Android files on your boot device.
The Docker service is reinstalled every time you boot the machine because unRAID runs from RAM no need to do anything about that. Such things happen because of custom things in the go file/User Script.