I'm an active duty E5 in the US Army. There is a way to "get away" with smoking in the army. In every unit, there's some sort of UPL program, the urinalysis program to randomly test soldiers for drugs. I've never encountered, in my 5 years of service, a 100% urinalysis.
The only way to get away with smoking weed in the army is to be the NCO that's in charge of running the UPL program in your unit. You can ensure your name doesn't show up on the roster. Or just put a pothead in charge, and he can ensure his buddies don't get put on the list.
But certainly, you CANNOT and WILL NEVER have a medicinal marijuana prescription while in the military, period.