I can't speak from experience on this one, so take this with a grain of salt, but I seriously doubt that you would be allowed to serve in the armed forces while smoking weed. There are other medications, and I assume the military would prefer you to be taking one of the other things on the (grossly overinflated) psychiatric pharmaceuticals market.