diff --git a/docker/Dockerfile.benchmark.libero b/docker/Dockerfile.benchmark.libero index 4adee9919..e13cf7de1 100644 --- a/docker/Dockerfile.benchmark.libero +++ b/docker/Dockerfile.benchmark.libero @@ -67,11 +67,15 @@ COPY --chown=user_lerobot:user_lerobot src/ src/ RUN uv sync --locked --extra libero --no-cache -# Pre-create libero's config file so it never prompts for a dataset path at runtime. +# Pre-create libero's config file pointing to the bundled package assets. # libero/libero/__init__.py calls input() when ~/.libero/config.yaml is missing. -# Any valid YAML satisfies the existence check; actual paths only matter for dataset loading. -RUN mkdir -p /home/user_lerobot/.libero && \ - printf 'assets: /tmp/libero_assets\nbddl_files: /tmp/libero_bddl\ndatasets: /tmp/libero_datasets\ninit_states: /tmp/libero_init\n' \ +# 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. +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" \ > /home/user_lerobot/.libero/config.yaml RUN chmod +x /lerobot/.venv/lib/python${PYTHON_VERSION}/site-packages/triton/backends/nvidia/bin/ptxas