Expanding Arthur's comment:
First, make sure that neither player has a method of dealing damage present on the battlefield. I personally recommend Jokulhaups, but remember to float the mana you'll need to do everything else (17UBBR). If they have any damage dealing enchantments, you'll have to deal with those separately, but those are pretty rare.
Second, play Omen Machine, Blood Moon, and Hive Mind.
Finally, play Neverending Torment.
Now nobody can play spells or deck themselves (one of the nuances of decking yourself is that you only lose when you try to draw and find no cards left. Any other library interactions just fail on an empty library). The lands you play will have no abilities. If you've already cleared the board of any sources of damage or other things that might break the lock, everybody is well and truly stuck.