Cheating
As Leon mentioned in a comment, there is no null-magic zone spells. If there was, it would be so easy. We could just put them all over a normal prison and be done with it.
Non-magic solution
Have magic-detecting automatic turrets mounted everywhere. Enough that they couldn't be taken out all at once. Instantly kill any prisoner that tries to cast anything.
Magic solution 1
Have a small army (10) wizards whose only job is to null any spell cast by any prisoner.
Magic solution 2
Use walls that are resistant to magic spells, i.e., they can use magic but it won't help.
Magic solution 3
Make them imprisoned forever by default. The only way they can get out is if they make x [whatever]s. Unfortunately, making a [whatever] requires all their magic for the day. BestIf they don't make their [whatever] on some day, they have to make 50 more. (Best combined with one of the other solutions.)