mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-16 17:20:05 +00:00
fix(docker): use recursive glob for deeply nested asset zip structure
The LIBERO-plus assets.zip has a deeply nested path (inspire/hdd/project/.../assets) that didn't match the shallow glob. Use recursive glob to find assets/scenes regardless of nesting depth. Made-with: Cursor
This commit is contained in:
@@ -133,7 +133,8 @@ assets_dst = os.path.join(get_libero_path('benchmark_root'), 'assets'); \
|
||||
print(f'Downloading LIBERO-plus assets to {assets_dst}...'); \
|
||||
zp = hf_hub_download('Sylvest/LIBERO-plus', 'assets.zip', repo_type='dataset', local_dir='/tmp/lp-dl'); \
|
||||
zipfile.ZipFile(zp).extractall('/tmp/lp-unzip'); \
|
||||
src = glob.glob('/tmp/lp-unzip/inspire/*/assets')[0]; \
|
||||
hits = glob.glob('/tmp/lp-unzip/**/assets/scenes', recursive=True); \
|
||||
src = os.path.dirname(hits[0]); \
|
||||
shutil.move(src, assets_dst); \
|
||||
shutil.rmtree('/tmp/lp-dl', True); shutil.rmtree('/tmp/lp-unzip', True); \
|
||||
print(f'Assets installed: {os.listdir(assets_dst)[:5]}...')" ;; \
|
||||
|
||||
Reference in New Issue
Block a user