Like I said, you need to run accelerate config on both machines (and yes you need to install everything you need on both of them), then run accelerate launch training_script.py on both machines as well.