Run script over ssh using torchrun

I tried to make the run/debug configuration so that it would execute


where torchrun is located on the server (I can connect it via ssh). I can't set "torchrun" as a new interpreter on ssh and shell script works only for the local machine. So I have no idea how to run my script over ssh using torchrun.