import json,pathlib,hashlib,subprocess for folder in ['/home/ps/huobao-model-bridge','/home/ps/huobao-vdn/bridge']: p=pathlib.Path(folder); cfg=json.loads((p/'config.json').read_text()) print(json.dumps({'folder':folder,'hash':hashlib.sha256((p/'bridge.py').read_bytes()).hexdigest(),'upstream':cfg['h3']['url']})) for item in json.loads(subprocess.check_output(['docker','inspect','huobao-model-bridge','huobao-vdn-bridge','huobao-vdn-normalizer'],text=True)): print(json.dumps({'container':item['Name'],'image':item['Config']['Image'],'mounts':[{'source':m['Source'],'destination':m['Destination']} for m in item['Mounts']]})) p=pathlib.Path('/home/ps/huobao-gpu-selection/task-tracking-current.json') if p.exists(): directory=pathlib.Path(json.loads(p.read_text())['directory']) print((directory/'manifest.json').read_text())