mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-16 17:20:05 +00:00
fix(ci): point libero config to bundled package init_files
The config was pointing to /tmp/libero_init which doesn't exist. Use importlib.util.find_spec to locate the hf-libero package directory and write paths to the actual bundled bddl_files/init_files/assets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user