It would be nice to have a cryosparcm cluster list
command to list all installed lanes. I need the lane names to run cryosparcm remove
, but these are only available through the GUI.
As a workaround, can the names be accessed via python?
It would be nice to have a cryosparcm cluster list
command to list all installed lanes. I need the lane names to run cryosparcm remove
, but these are only available through the GUI.
As a workaround, can the names be accessed via python?
I found the start to a solution:
$ echo 'db.sched_config.aggregate([ {$match: {name: "lanes"}}, {$unwind: "$value"}, {$project: {_id:0, name: "$value.name"}} ])' | cryosparcm_bliven mongo
MongoDB shell version v3.4.10
connecting to: mongodb://localhost:39061/meteor
MongoDB server version: 3.4.10
{ "name" : "gpu" }
{ "name" : "gpu-big" }
{ "name" : "gpu-short" }
{ "name" : "gpu-rtx2080ti" }
{ "name" : "cpu-daily" }
bye
Probably cleaning up the output will require a bit of python to wrap that mongodb query.
Perhaps cryosparcm cli 'get_scheduler_lanes()'
gets you closer to what you need?
Thanks, this is much cleaner than the mongo solution.
It’s slightly annoying that the cli command just prints python objects. I ended up re-parsing it to get just the names:
$ cryosparcm cli 'get_scheduler_lanes()' |
python -c 'import sys;print("\n".join(d["name"] for d in eval(sys.stdin.read())))'
gpu
gpu-big
gpu-short
gpu-rtx2080ti
cpu-daily