Ryzen 5600G + discrete GTXes - possible?

I may soon have a system with a Ryzen 5600G CPU and a B550 motherboard. I want to use the AMD components for graphics, but to do CUDA work using two NVIDIA cards (specifically, GTX 1050 Ti’s). And - I’m using Linux as my operating system.

(Yes, it is a bit of a silly setup, not very fancy or new; but the big bugs are spent by my employers on machines I have at work, this is just for toying around.)

My question: Will this work? Will I be able to do graphics via AMD and compute via NVIDIA drivers, coexisting peacefully without the drivers/activities messing with each other?