NVIDIA GPU on 2015 iMac

Hey everyone, I have an older 2015 iMac which apple has stopped providing software updates to, and I was wondering if I duel boot into windows or Linux can I use a NVIDIA GPU for ML with PyTorch or does Apple’s BIOS prevent that?