def _get_actor_specs(nodes, nb_gpus_per_node, using_cpu_only,
    nb_cpu_workers, grpc_port):
    """ Returns the list of ip:port for all actor nodes """
    gpu_ips = []
    for node_ip in nodes.values():
        for gpu_ix in range(nb_cpu_workers if using_cpu_only else
            nb_gpus_per_node):
            gpu_ips += ['%s:%d' % (node_ip, grpc_port + 200 + gpu_ix)]
    nb_learners = max(len(gpu_ips) // 8, 1)
    return gpu_ips[:-nb_learners]
