Cover the pots with a thick layer of perlite over the soil after watering with mosquito dunk treated water. Also are you over watering or is it just the start of gnat season?
Can you get diatomaceous earth? If so, put a layer, about 1/2 cm thick, over the soil surface in each pot. Do it after watering and don't water for at least several days.
The adult flies won't be able to reach the soil to lay eggs, and the larvae that hatch into adults in the soil won't be able to get out.
+1 for the diatomaceous earth - i've never had buggos on my cannabis but I've used this before for veggie gardening and basement pest control - works outstanding.
i've used it in closed environments - always be careful with any of this stuff but i nor my pets had any issues.
If you cant find any of those guys suggested to you, try search fot pyrethrin, it worked good to my gnats situation. It didn't eliminated all, but reduced the population significantly! A couple more applies though should kill all of them, but i am happy with that!