zefancainlp's picture
download
raw
890 Bytes
from pathlib import Path
import subprocess,json,time
root=Path('/home/sigma/xiaofan/kernel-private-entry-split-step0-api3-20261105')
image='sha256:63e5cf4304efec771bdf3ad56291db7ad0168d86ea8d34a7b4629e1ce43d905b'
started=time.time()
with(root/'control/image_save.stderr').open('wb')as err:
src=subprocess.Popen(['docker','save',image],stdout=subprocess.PIPE,stderr=err)
dst=subprocess.Popen(['ssh','-o','BatchMode=yes','n4-4','docker load'],stdin=src.stdout,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
src.stdout.close();out,errors=dst.communicate();code=src.wait()
(root/'control/image_transfer.stdout').write_bytes(out);(root/'control/image_transfer.stderr').write_bytes(errors)
(root/'control/image_transfer.json').write_text(json.dumps(dict(success=code==0 and dst.returncode==0,source_exit=code,destination_exit=dst.returncode,seconds=time.time()-started,image=image),indent=2))

Xet Storage Details

Size:
890 Bytes
·
Xet hash:
54a9a7168865257ffc4c7b245e2a4956ef6df7d7df83ef189900d83ea1bfff32

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.