From 4131f22ea11ec757d96bb52551cccf2228cb4a09 Mon Sep 17 00:00:00 2001 From: Pepijn Date: Wed, 8 Apr 2026 16:14:34 +0200 Subject: [PATCH] fix(ci): pre-download libero-assets at image build time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 586-file lerobot/libero-assets dataset was being fetched at runtime (on first reset()) which consistently hit a 504 Gateway Timeout on CI runners. Downloading at build time bakes the assets into the image so no network call is needed during the smoke eval. The config.yaml now points assets → ~/.libero/assets (the downloaded snapshot) instead of the bundled (empty) package path. Co-Authored-By: Claude Sonnet 4.6 --- docker/Dockerfile.benchmark.libero | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.benchmark.libero b/docker/Dockerfile.benchmark.libero index b3969d491..b3f7e69db 100644 --- a/docker/Dockerfile.benchmark.libero +++ b/docker/Dockerfile.benchmark.libero @@ -67,15 +67,19 @@ COPY --chown=user_lerobot:user_lerobot src/ src/ RUN uv sync --locked --extra libero --extra smolvla --no-cache -# Pre-create libero's config file pointing to the bundled package assets. -# libero/libero/__init__.py calls input() when ~/.libero/config.yaml is missing. -# We use importlib.util.find_spec (does NOT execute libero, so no prompt) to locate -# the package, then write the config to the correct bundled paths. +# Pre-download lerobot/libero-assets from HF Hub so nothing is fetched at +# runtime (which times out on CI). Point the libero config at the cached path. +# libero/libero/__init__.py calls input() when ~/.libero/config.yaml is missing, +# so we write the config before any libero import can happen. RUN LIBERO_DIR=$(python${PYTHON_VERSION} -c \ "import importlib.util, os; s=importlib.util.find_spec('libero'); \ print(os.path.join(os.path.dirname(s.origin), 'libero'))") && \ mkdir -p /home/user_lerobot/.libero && \ - printf "assets: ${LIBERO_DIR}/assets\nbddl_files: ${LIBERO_DIR}/bddl_files\ndatasets: ${LIBERO_DIR}/../datasets\ninit_states: ${LIBERO_DIR}/init_files\n" \ + python${PYTHON_VERSION} -c "\ +from huggingface_hub import snapshot_download; \ +snapshot_download(repo_id='lerobot/libero-assets', repo_type='dataset', \ + local_dir='/home/user_lerobot/.libero/assets')" && \ + printf "assets: /home/user_lerobot/.libero/assets\nbddl_files: ${LIBERO_DIR}/bddl_files\ndatasets: ${LIBERO_DIR}/../datasets\ninit_states: ${LIBERO_DIR}/init_files\n" \ > /home/user_lerobot/.libero/config.yaml RUN chmod +x /lerobot/.venv/lib/python${PYTHON_VERSION}/site-packages/triton/backends/nvidia/bin/ptxas