import json,subprocess def run(*a): return subprocess.check_output(a,text=True,stderr=subprocess.STDOUT) print(run('nvidia-smi','--query-gpu=index,uuid,name,memory.used,utilization.gpu','--format=csv,noheader')) for name in ('comfyui','h3-caption-gpu3-canary-8a5f','canvas-h3-prompt-normalizer-healthy-20261026','huobao-vdn-normalizer'): d=json.loads(run('docker','inspect',name))[0] print(json.dumps({'name':name,'image':d['Config']['Image'],'gpu':d['HostConfig'].get('DeviceRequests'),'mounts':[{'src':m['Source'],'dst':m['Destination'],'rw':m['RW']} for m in d['Mounts']],'cmd':d['Config']['Cmd']},ensure_ascii=False)) for name in ('comfyui','h3-caption-gpu3-canary-8a5f'): code="""import json,pathlib for root in ('/app/ComfyUI','/workspace/ComfyUI','/comfyui','/opt/ComfyUI'): p=pathlib.Path(root) if (p/'custom_nodes').exists(): print(root, [x.name for x in (p/'custom_nodes').iterdir() if x.is_dir()]) """ print(name,run('docker','exec',name,'python','-c',code)) code="""import inspect,app for name in dir(app): if any(s in name.lower() for s in ('select_provider','choose_provider','reserve_provider','queue_depth')): value=getattr(app,name) if callable(value): try: print(inspect.getsource(value)) except: pass print(inspect.getsource(app.JobRequest) if hasattr(app,'JobRequest') else '') """ print(run('docker','exec','huobao-vdn-normalizer','python','-c',code))