The launcher will pass a --local_rank arg to your train.py script, so you need to add that to the ArgumentParser.
Besides. you need to pass that rank, and world_size, and init_method (which basically contains MASTER_ADDR and MASTER_PORT) to dist.init_process_group either through arguments or env vars.
This example might be helpful: https://github.com/pytorch/examples/pull/743 242