Of course you can! There are only two issues: you will need to water a lot more and your harvest will be smaller. But if you have limited space it's better than nothing. I'm more of a chilli guy and I grow all my chillies in my apartment in 1L pots just fine.