mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-15 16:49:55 +00:00
69aeda68f5
- Add NVIDIA EGL/Vulkan vendor ICDs and graphics libs to both Dockerfiles - Refactor LIBERO-plus asset download into a separate build step - Fix KeyError in datasets/factory.py when stats dict is None or missing keys Made-with: Cursor
48 lines
2.2 KiB
Docker
48 lines
2.2 KiB
Docker
# Copyright 2026 The HuggingFace Inc. team. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
FROM lerobot-eval-base:latest
|
|
|
|
# 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"
|
|
|
|
# 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 os, yaml, importlib.util; \
|
|
root = os.path.dirname(importlib.util.find_spec('libero.libero').origin); \
|
|
d = dict(benchmark_root=root, bddl_files=os.path.join(root,'bddl_files'), \
|
|
init_states=os.path.join(root,'init_files'), datasets=os.path.join(root,'..','datasets'), \
|
|
assets=os.path.join(root,'assets')); \
|
|
cfg_dir = os.path.expanduser('~/.libero'); os.makedirs(cfg_dir, exist_ok=True); \
|
|
yaml.dump(d, open(os.path.join(cfg_dir,'config.yaml'),'w')); print('libero config created')" \
|
|
&& python -c "from libero.libero import benchmark, get_libero_path; print('libero OK')"
|
|
|
|
CMD ["/bin/bash"]
|