motor_junkie:

These servers are not connected to each other.


What does this mean? Their IPs are not reachable from each other?

I have seen  nn.DistributedDataParallel   8but how do I mention the IP address of multiple servers?

If they can reach each other through network, yes, DistributedDataParallel can work across multiple machines. You need to provide the master address and master IP for all peers to do rendezvous. See this example 21.
If you want to choose a specific network interface, you can configure the following two env vars (more details 3). You only need one of them depending on which backend you are using.
NCCL_SOCKET_IFNAME, for example export NCCL_SOCKET_IFNAME=eth0
GLOO_SOCKET_IFNAME, for example export GLOO_SOCKET_IFNAME=eth0