fix(docker): bypass uv extras chain bug in libero_plus Dockerfile

uv silently skips packages when resolving a nested extras chain
(lerobot[libero_plus] -> lerobot[libero] -> hf-libero -> robosuite).
POST-INSTALL grep confirmed robosuite absent after install despite uv
reporting 'Resolved 113 packages, Installed 1'.

Fix: install all libero_plus deps directly by name, bypassing the extras
chain entirely. Also add --plain flag to build script for verbose output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Pepijn
2026-03-22 21:12:26 -07:00
parent 418791ebba
commit e54e582a6f
2 changed files with 21 additions and 8 deletions
+17 -8
View File
@@ -14,15 +14,24 @@
FROM lerobot-eval-base:latest
# Diagnostic: show what's in the venv before the libero_plus install
RUN echo "=== PRE-INSTALL ===" && uv pip list | grep -iE "robosuite|bddl|robomimic|hf.libero|scikit.image|wand" || echo "(none of the libero_plus-specific packages are installed)"
# Install libero_plus deps explicitly rather than via ".[libero_plus]" extras chain.
# uv has a bug where it considers packages "already resolved" when coming through
# a nested lerobot[libero] → lerobot[libero_plus] extras chain, silently skipping them.
RUN uv pip install --no-cache \
"hf-libero>=0.1.3,<0.2.0" \
"hf-egl-probe>=1.0.1" \
"transformers>=5.3.0,<6.0.0" \
"scipy>=1.14.0,<2.0.0" \
"bddl>=1.0.1,<2.0.0" \
"future" \
"easydict>=1.9" \
"wand" \
"scikit-image>=0.20.0" \
"gym>=0.25.0,<0.27.0"
RUN uv pip install --no-cache ".[libero_plus]" \
&& echo "=== POST-INSTALL ===" && uv pip list | grep -iE "robosuite|bddl|robomimic" \
# Clone LIBERO-plus; its setup.py has empty install_requires so deps come from the
# lerobot[libero] extra above. Install the package to get LIBERO-plus environments,
# then add a .pth so the libero module can locate its data files at runtime.
&& git clone --depth 1 https://github.com/sylvestf/LIBERO-plus.git /tmp/LIBERO-plus \
# Clone LIBERO-plus; install with --no-deps (runtime deps declared above via hf-libero).
# Add .pth so the libero module can locate its data files at runtime.
RUN git clone --depth 1 https://github.com/sylvestf/LIBERO-plus.git /tmp/LIBERO-plus \
&& uv pip install --no-cache --no-deps /tmp/LIBERO-plus \
&& python -c "import pathlib, site; pathlib.Path(site.getsitepackages()[0], 'libero_plus_repo.pth').write_text('/tmp/LIBERO-plus\n')" \
&& python -c "import libero, robosuite, bddl"