mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-16 00:59:46 +00:00
fix(ci): pre-create libero config in Dockerfile to bypass stdin prompt
libero/__init__.py calls input() when ~/.libero/config.yaml is missing. We write the config at image build time (without importing libero) so the prompt never fires at runtime. Also trigger CI on pyproject.toml changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,26 @@ 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.
|
||||
# libero/libero/__init__.py calls input() when ~/.libero/config.yaml is missing.
|
||||
# We replicate what get_default_path_dict() would write, without importing libero.
|
||||
RUN python${PYTHON_VERSION} -c "
|
||||
import os, yaml, importlib.util
|
||||
spec = importlib.util.find_spec('libero')
|
||||
pkg_dir = os.path.dirname(spec.origin)
|
||||
libero_dir = os.path.join(pkg_dir, 'libero')
|
||||
paths = {
|
||||
'bddl_files': os.path.join(libero_dir, 'bddl_files'),
|
||||
'init_states': os.path.join(libero_dir, 'init_files'),
|
||||
'datasets': os.path.join(libero_dir, '../datasets'),
|
||||
'assets': os.path.join(libero_dir, 'assets'),
|
||||
}
|
||||
config_dir = os.path.expanduser('~/.libero')
|
||||
os.makedirs(config_dir, exist_ok=True)
|
||||
with open(os.path.join(config_dir, 'config.yaml'), 'w') as f:
|
||||
yaml.dump(paths, f)
|
||||
"
|
||||
|
||||
RUN chmod +x /lerobot/.venv/lib/python${PYTHON_VERSION}/site-packages/triton/backends/nvidia/bin/ptxas
|
||||
|
||||
COPY --chown=user_lerobot:user_lerobot . .
|
||||
|
||||
Reference in New Issue
Block a user