In addition to mosquito dunks, I'd recommend setting out shallow saucers or bowls of soapy water. You'll catch a lot of adults that way. I grow in soil but if your system can tolerate being 'shocked' with a treatment of hydrogen peroxide, that might work. I just pour about an ounce of the food-grade peroxide in a gallon of water and apply it to the medium that the gnat larva are infesting.
Finally, if you can't get all of them, buy a few carnivorous plants like the sundews, butterworts or pitcher plants. Not Venus flytraps because they won't bother to even try to catch something as small as a gnat, usually. That way, you can have the pleasure of watching the little bastards struggle to escape while the plant slowly digests them. Carnivorous plants are a trip, just make sure you start out with the 'beginner' species because some of them are really sensitive to the slightest little variations in environmental factors like humidity, pH, adequate light, temperature (day and night) etc.