How to assign different custom resources for each worker nodes?

You could configure several worker node types with different custom resources and cap them at a max of 1, i.e. something like:

available_node_types:
    ray.head.default:
        resources: {}
        node_config:
            ...
    ray.worker1.default:
        min_workers: 0
        max_workers: 1
        resources:
            custom1: 1
        node_config:
            ...
    ray.worker2.default:
        min_workers: 0
        max_workers: 1
        resources:
            custom2: 1
        node_config:
            ...
    ray.worker3.default:
        min_workers: 0
        max_workers: 1
        resources:
            custom3: 1
        node_config:
            ...

Not sure if this is what you’re looking for, if you can provide more info on your use case there might be a better approach.

1 Like