Specifying IP Address of Node When Calling .remote()

def my_function():
    ... ... 
    return xxx


I have various PCs that I want to run my distributed setup on. is the head node., are the worker nodes.

When calling my_function.remote(), can I specify the IP address of the PC to execute the function on? My objective is to ensure that I run this function on all nodes exactly once.

Yes. If you try running ray.cluster_resources(), you can see each node IP will have custom resources. You can specify it to f.options(resources={f"{node_ip}": 0.001}).remote()

Thanks for your help. Your solution works very well.