[torch][launch] Add ability to override sys.executable for `torch.distributed.run` (#66179)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66179
The diff adds check for `PYTHON_EXEC` environment variable. If the variable is set, it will override `sys.executable` for `torch.distibuted.run`.
This means that if `PYTHON_EXEC` is set, user scripts executed via `torch.distributed.run` will start via value of `os.environ["PYTHON_EXEC"]`
Test Plan: unittest
Reviewed By: kiukchung
Differential Revision: D31329003
fbshipit-source-id: b9d0167d99bbf463a6390f508324883ca4a1e439