ok .. well ... if you have to choose between
1.) in the ground .. with 5 hrs direct sun and light rest of the day .
2.) in pots (even 20 gallon) with 8 hrs light and some work moveing them two places
I would have no doubt ... 1 !!!! in the ground ...
your plant will love you for it .. and not just that .. you will have less problems .. with watering and nutriens .. plants will take care of most of ther own ..
I have a friend who used to grow under some tress ..forest like (back of his back yard)
only realy open on top .. lets say 3 hrs direct sun maybe .. and maybe 2 hrs before and after when the sun hit them in between the leaves of the trees ...
he had em in the ground .. did`t do much .. on hot days with littel rain he did give em some water .. and a littel nutriens doing flowering mostly . had provided them with nice soil in the hols when he plantet the small plants out ..
they grew to tress I tell you .. 7-8 feet ... 1-2 ponders .. outdoors is easy .. in the ground that is ..
if you dont want passing Ppl. to be able to see em over a fench .. well why not build a littel wind screen on your terrace .. place chair or two and a littel table .. cover it up a bit .. the wind scree is of course white .. for sun relexions .. and keep em low .. top/FIM em .. LST em .. make em look anything but weed .. grow some tomatos or sumthing beside .. hang red plastic balls on the weed