From 4b9f6c4aedf7e9e7829f552a8b5e7f6b3adf504a Mon Sep 17 00:00:00 2001 From: Pepijn Kooijmans Date: Mon, 23 Mar 2026 18:48:25 +0100 Subject: [PATCH] fix(docker): download LIBERO-plus assets (~6 GB) at image build time The benchmark containers were missing the scene/texture/object assets required by LIBERO-plus. Download them from HuggingFace Hub during the Docker build so containers are self-contained and ready to run. Made-with: Cursor --- docker/Dockerfile.benchmark | 14 +++++++++++++- docker/Dockerfile.eval-libero-plus | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.benchmark b/docker/Dockerfile.benchmark index 20139d4fd..7c05c9e1f 100644 --- a/docker/Dockerfile.benchmark +++ b/docker/Dockerfile.benchmark @@ -124,7 +124,19 @@ init_states=os.path.join(root,'init_files'), datasets=os.path.join(root,'..','da assets=os.path.join(root,'assets')); \ cfg_dir = os.path.expanduser('~/.libero'); os.makedirs(cfg_dir, exist_ok=True); \ yaml.dump(d, open(os.path.join(cfg_dir,'config.yaml'),'w')); print('libero config created')" \ - && /lerobot/.venv/bin/python -c "from libero.libero import benchmark, get_libero_path; print('libero OK')" ;; \ + && /lerobot/.venv/bin/python -c "from libero.libero import benchmark, get_libero_path; print('libero OK')" \ + && /lerobot/.venv/bin/python -c "\ +from huggingface_hub import hf_hub_download; \ +import zipfile, shutil, glob, os; \ +from libero.libero import get_libero_path; \ +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]; \ +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]}...')" ;; \ *) \ uv pip install --no-cache ".[${BENCHMARK}]" ;; \ esac diff --git a/docker/Dockerfile.eval-libero-plus b/docker/Dockerfile.eval-libero-plus index a59ff8818..80e38b8bb 100644 --- a/docker/Dockerfile.eval-libero-plus +++ b/docker/Dockerfile.eval-libero-plus @@ -42,6 +42,18 @@ init_states=os.path.join(root,'init_files'), datasets=os.path.join(root,'..','da assets=os.path.join(root,'assets')); \ cfg_dir = os.path.expanduser('~/.libero'); os.makedirs(cfg_dir, exist_ok=True); \ yaml.dump(d, open(os.path.join(cfg_dir,'config.yaml'),'w')); print('libero config created')" \ - && python -c "from libero.libero import benchmark, get_libero_path; print('libero OK')" + && python -c "from libero.libero import benchmark, get_libero_path; print('libero OK')" \ + && python -c "\ +from huggingface_hub import hf_hub_download; \ +import zipfile, shutil, glob, os; \ +from libero.libero import get_libero_path; \ +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]; \ +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]}...')" CMD ["/bin/bash"]