I've done it. To get the best results you need to pick the right strain. You don't want a long flowering branchy sativa. An indica or indica dominate hybrid that can grow into one big cola is preferable. You can get large yields with a bunch of plants 12/12 in 1 gallon containers.
This was a 12/12 from seed Wicked Widow.