I used these guides, though it was a quite long dance, so I didn’t write everything down 🙁
1. Need to install a graphic driver nvidia-375.
2. Don’t reboot.
3. Then need to install CUDA (9.1). It’ll also install nvidia-384, though it doesn’t make a login loop after that.
5. Compile TensorFlow from the source code.
The driver and CUDA are deb-based.
Good sign: your video adapter should work. Just installation of drivers (correct) – 90% of success. DO NOT download drivers or cuda from the official site. Only from official repos. See guide aboves for the details.
If have any questions, please, mail me: email@example.com