@@ -31,14 +31,16 @@ class CRNTable(App[CRNInfo]):
3131 only_reward_address : bool = False
3232 only_qemu : bool = False
3333 only_confidentials : bool = False
34+ only_gpu : bool = False
3435 current_sorts : set = set ()
3536 BINDINGS = [
3637 ("s" , "sort_by_score" , "Sort By Score" ),
3738 ("n" , "sort_by_name" , "Sort By Name" ),
3839 ("v" , "sort_by_version" , "Sort By Version" ),
3940 ("a" , "sort_by_address" , "Sort By Address" ),
4041 ("c" , "sort_by_confidential" , "Sort By 🔒 Confidential" ),
41- ("q" , "sort_by_qemu" , "Sort By Qemu" ),
42+ ## ("q", "sort_by_qemu", "Sort By Qemu"),
43+ ("g" , "sort_by_gpu" , "Sort By GPU" ),
4244 ("u" , "sort_by_url" , "Sort By URL" ),
4345 ("x" , "quit" , "Exit" ),
4446 ]
@@ -128,6 +130,7 @@ async def fetch_node_info(self, node: CRNInfo):
128130 )
129131 node .qemu_support = crn_info .get ("computing" , {}).get ("ENABLE_QEMU_SUPPORT" , False )
130132 node .confidential_computing = crn_info .get ("computing" , {}).get ("ENABLE_CONFIDENTIAL_COMPUTING" , False )
133+ node .gpu_support = crn_info .get ("computing" , {}).get ("ENABLE_GPU_SUPPORT" , False )
131134 node .machine_usage = crn_info .get ("machine_usage" )
132135
133136 # Skip nodes without machine usage
@@ -149,7 +152,11 @@ async def fetch_node_info(self, node: CRNInfo):
149152 logger .debug (f"Skipping node { node .hash } , no confidential support" )
150153 return
151154 # Skip non-gpu nodes if only-gpu is set
152- if self .only_gpu and not node .gpu_support and len (node .machine_usage .gpu .available_devices ) < 1 :
155+ if (
156+ self .only_gpu
157+ and not node .gpu_support
158+ and not (node .machine_usage .gpu and len (node .machine_usage .gpu .available_devices ) < 1 )
159+ ):
153160 logger .debug (f"Skipping node { node .hash } , no GPU support or without GPU available" )
154161 return
155162 self .filtered_crns += 1
@@ -220,5 +227,8 @@ def action_sort_by_confidential(self):
220227 def action_sort_by_qemu (self ):
221228 self .sort_by ("qemu_support" )
222229
230+ def action_sort_by_gpu (self ):
231+ self .sort_by ("gpu_support" )
232+
223233 def action_sort_by_url (self ):
224234 self .sort_by ("url" )
0 commit comments