What do I do with the ground wire in a smoke detector install?
That looks like a plastic box to me. If it is metal, code requires that the box be grounded. If all the external parts of the smoke detector are plastic then a ground is not required (the same is true with light fixtures).
I don’t usually cap bare grounds. I just tuck them in the box (the entire length is conductive, so I don’t see the point). If it makes you feel better, put a cap on it and tuck it in the box.