15 lines
862 B
Python
15 lines
862 B
Python
import subprocess,json,pathlib
|
|
def run(*a):return subprocess.check_output(a,text=True)
|
|
name='huobao-comfy-gpu1';d=json.loads(run('docker','inspect',name))[0]
|
|
source=next(m['Source'] for m in d['Mounts'] if m['Destination']=='/app/custom_nodes')
|
|
root=pathlib.Path(source)/'ComfyUI-H3CaptionPipeline'
|
|
print('plugin_source',str(root))
|
|
for f in ('__init__.py','worker_state.py'):
|
|
s=(root/f).read_text();target=pathlib.Path('/home/ps/huobao-gpu-selection')/('8189-'+f);target.write_text(s)
|
|
print('saved',target)
|
|
for e in d['Config'].get('Env',[]):
|
|
k=e.split('=',1)[0]
|
|
if k.startswith('H3_') and 'TOKEN' not in k and 'KEY' not in k:print(e)
|
|
print('plugin_files',[p.name for p in root.iterdir()])
|
|
print('support_mounts',[{'source':m['Source'],'dest':m['Destination'],'rw':m['RW']} for m in d['Mounts'] if 'h3-' in m['Destination'] or 'vision' in m['Destination']])
|