Large enough lathe with a 4 jaw chuck. You could also make a mandrel/center to mount in a chuck or drive plate that would locate on the chamber and use a steady rest on the muzzle end.
Depending on the lathe, if you de-populate the barrel you could insert the barrel through the headstock so that just enough of the muzzle is available for machining.
You just have to be creative.
Then, there is always the mill route either as NickLeduc mentioned if CNC capable or you could even fixture the barrel vertically on the side of a Bridgeport table, locate the bore axis, use a boring head to cut the thread OD then use a die in an appropriate holder and power cut the threads.