How to create @ray.remote jobs that will only run on the workers from the local node?

One possible solution is to specify the custom resources on a node that has files;

ray start --resources=’{“files”:1}’

@ray.remote
def f():
    pass

ray.get(f.options(resources={"file":0.001})).remote()
2 Likes