mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-26 19:26:16 +00:00
fix(robocerebra): drop alias extra + simplify docker image
Two problems rolled up: 1. `uv sync --locked --extra test` was failing because pyproject.toml added a `robocerebra = ["lerobot[libero]"]` alias extra but uv.lock wasn't regenerated. Drop the alias — nothing in CI actually needs the extra name (the Dockerfile just installs what it needs directly), so this restores pyproject.toml and uv.lock to byte-exact origin/main. 2. Rebase docker/Dockerfile.benchmark.robocerebra on huggingface/lerobot-gpu:latest (same pattern as libero/metaworld/…). The nightly image already ships lerobot[all] which includes [libero], so the RoboCerebra image is essentially identical to the LIBERO one: fetch libero-assets, write ~/.libero/config.yaml, overlay source. 92 → 43 lines. Also repoint the CI workflow comment that referenced the removed extra. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -312,8 +312,9 @@ jobs:
|
|||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
|
|
||||||
# ── ROBOCEREBRA ───────────────────────────────────────────────────────────
|
# ── ROBOCEREBRA ───────────────────────────────────────────────────────────
|
||||||
# Isolated image: lerobot[robocerebra] only (= lerobot[libero] alias)
|
# Reuses the LIBERO simulator (libero_10 suite) with RoboCerebra camera
|
||||||
# Uses the libero_10 suite with RoboCerebra camera defaults (image/wrist_image).
|
# defaults (image/wrist_image). The image is layered on
|
||||||
|
# huggingface/lerobot-gpu, which already ships [libero] as part of [all].
|
||||||
robocerebra-integration-test:
|
robocerebra-integration-test:
|
||||||
name: RoboCerebra — build image + 1-episode eval
|
name: RoboCerebra — build image + 1-episode eval
|
||||||
runs-on:
|
runs-on:
|
||||||
|
|||||||
@@ -12,81 +12,32 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Isolated benchmark image for RoboCerebra integration tests.
|
# Benchmark image for RoboCerebra integration tests.
|
||||||
# Installs only lerobot[robocerebra] (= lerobot[libero]: hf-libero, dm-control, mujoco)
|
# RoboCerebra reuses LIBERO's simulator (libero_10 suite) with a different
|
||||||
# so its dependency tree cannot conflict with other benchmarks.
|
# rename_map, so this image is identical to the LIBERO benchmark image —
|
||||||
|
# extends the nightly GPU base with LIBERO assets + the PR's source code.
|
||||||
#
|
#
|
||||||
# Build: docker build -f docker/Dockerfile.benchmark.robocerebra -t lerobot-benchmark-robocerebra .
|
# Build: docker build -f docker/Dockerfile.benchmark.robocerebra -t lerobot-benchmark-robocerebra .
|
||||||
# Run: docker run --gpus all --rm lerobot-benchmark-robocerebra lerobot-eval ...
|
# Run: docker run --gpus all --rm lerobot-benchmark-robocerebra lerobot-eval ...
|
||||||
|
|
||||||
ARG CUDA_VERSION=12.4.1
|
FROM huggingface/lerobot-gpu:latest
|
||||||
ARG OS_VERSION=22.04
|
|
||||||
FROM nvidia/cuda:${CUDA_VERSION}-base-ubuntu${OS_VERSION}
|
|
||||||
|
|
||||||
ARG PYTHON_VERSION=3.12
|
# Pre-download lerobot/libero-assets from HF Hub so nothing is fetched at
|
||||||
|
# runtime (which times out on CI). Point the libero config at the cached path.
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
# libero/libero/__init__.py calls input() when ~/.libero/config.yaml is missing,
|
||||||
MUJOCO_GL=egl \
|
# so we write the config before any libero import can happen.
|
||||||
PATH=/lerobot/.venv/bin:$PATH \
|
RUN LIBERO_DIR=$(python -c \
|
||||||
CUDA_VISIBLE_DEVICES=0 \
|
|
||||||
DEVICE=cuda
|
|
||||||
|
|
||||||
# System deps — same set as Dockerfile.internal
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
software-properties-common build-essential git curl \
|
|
||||||
libglib2.0-0 libgl1-mesa-glx libegl1-mesa ffmpeg \
|
|
||||||
libusb-1.0-0-dev speech-dispatcher libgeos-dev portaudio19-dev \
|
|
||||||
cmake pkg-config ninja-build \
|
|
||||||
&& add-apt-repository -y ppa:deadsnakes/ppa \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
python${PYTHON_VERSION} \
|
|
||||||
python${PYTHON_VERSION}-venv \
|
|
||||||
python${PYTHON_VERSION}-dev \
|
|
||||||
&& curl -LsSf https://astral.sh/uv/0.8.0/install.sh | sh \
|
|
||||||
&& mv /root/.local/bin/uv /usr/local/bin/uv \
|
|
||||||
&& useradd --create-home --shell /bin/bash user_lerobot \
|
|
||||||
&& usermod -aG sudo user_lerobot \
|
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /lerobot
|
|
||||||
RUN chown -R user_lerobot:user_lerobot /lerobot
|
|
||||||
USER user_lerobot
|
|
||||||
|
|
||||||
ENV HOME=/home/user_lerobot \
|
|
||||||
HF_HOME=/home/user_lerobot/.cache/huggingface \
|
|
||||||
HF_LEROBOT_HOME=/home/user_lerobot/.cache/huggingface/lerobot \
|
|
||||||
TORCH_HOME=/home/user_lerobot/.cache/torch \
|
|
||||||
TRITON_CACHE_DIR=/home/user_lerobot/.cache/triton
|
|
||||||
|
|
||||||
RUN uv venv --python python${PYTHON_VERSION}
|
|
||||||
|
|
||||||
# Install only lerobot[robocerebra] — completely isolated from other benchmarks' dep trees.
|
|
||||||
# robocerebra = lerobot[libero] (hf-libero + dm-control + mujoco chain)
|
|
||||||
COPY --chown=user_lerobot:user_lerobot setup.py pyproject.toml uv.lock README.md MANIFEST.in ./
|
|
||||||
COPY --chown=user_lerobot:user_lerobot src/ src/
|
|
||||||
|
|
||||||
# Use uv pip install (not uv sync --locked) — the lockfile may be stale for
|
|
||||||
# this extra, and uv sync resolves all extras across all Python versions which
|
|
||||||
# hits cross-extra conflicts. pip-style install resolves only what's requested.
|
|
||||||
RUN uv pip install --no-cache -e ".[robocerebra,smolvla]"
|
|
||||||
|
|
||||||
# Pre-download libero assets and write ~/.libero/config.yaml so that
|
|
||||||
# libero/__init__.py does not call input() (which fails in non-interactive Docker).
|
|
||||||
RUN LIBERO_DIR=$(python${PYTHON_VERSION} -c \
|
|
||||||
"import importlib.util, os; s=importlib.util.find_spec('libero'); \
|
"import importlib.util, os; s=importlib.util.find_spec('libero'); \
|
||||||
print(os.path.join(os.path.dirname(s.origin), 'libero'))") && \
|
print(os.path.join(os.path.dirname(s.origin), 'libero'))") && \
|
||||||
mkdir -p /home/user_lerobot/.libero && \
|
mkdir -p /home/user_lerobot/.libero && \
|
||||||
python${PYTHON_VERSION} -c "\
|
python -c "\
|
||||||
from huggingface_hub import snapshot_download; \
|
from huggingface_hub import snapshot_download; \
|
||||||
snapshot_download(repo_id='lerobot/libero-assets', repo_type='dataset', \
|
snapshot_download(repo_id='lerobot/libero-assets', repo_type='dataset', \
|
||||||
local_dir='/home/user_lerobot/.libero/assets')" && \
|
local_dir='/home/user_lerobot/.libero/assets')" && \
|
||||||
printf "assets: /home/user_lerobot/.libero/assets\nbddl_files: ${LIBERO_DIR}/bddl_files\ndatasets: ${LIBERO_DIR}/../datasets\ninit_states: ${LIBERO_DIR}/init_files\n" \
|
printf "assets: /home/user_lerobot/.libero/assets\nbddl_files: ${LIBERO_DIR}/bddl_files\ndatasets: ${LIBERO_DIR}/../datasets\ninit_states: ${LIBERO_DIR}/init_files\n" \
|
||||||
> /home/user_lerobot/.libero/config.yaml
|
> /home/user_lerobot/.libero/config.yaml
|
||||||
|
|
||||||
# Workaround: Triton ships ptxas without the execute bit set.
|
# Overlay the PR's source code on top of the nightly image.
|
||||||
RUN chmod +x /lerobot/.venv/lib/python${PYTHON_VERSION}/site-packages/triton/backends/nvidia/bin/ptxas
|
|
||||||
|
|
||||||
COPY --chown=user_lerobot:user_lerobot . .
|
COPY --chown=user_lerobot:user_lerobot . .
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
CMD ["/bin/bash"]
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ video_benchmark = ["scikit-image>=0.23.2,<0.26.0", "pandas>=2.2.2,<2.4.0"]
|
|||||||
aloha = ["lerobot[dataset]", "gym-aloha>=0.1.2,<0.2.0", "lerobot[scipy-dep]"]
|
aloha = ["lerobot[dataset]", "gym-aloha>=0.1.2,<0.2.0", "lerobot[scipy-dep]"]
|
||||||
pusht = ["lerobot[dataset]", "gym-pusht>=0.1.5,<0.2.0", "pymunk>=6.6.0,<7.0.0"] # TODO: Fix pymunk version in gym-pusht instead
|
pusht = ["lerobot[dataset]", "gym-pusht>=0.1.5,<0.2.0", "pymunk>=6.6.0,<7.0.0"] # TODO: Fix pymunk version in gym-pusht instead
|
||||||
libero = ["lerobot[dataset]", "lerobot[transformers-dep]", "hf-libero>=0.1.3,<0.2.0; sys_platform == 'linux'", "lerobot[scipy-dep]"]
|
libero = ["lerobot[dataset]", "lerobot[transformers-dep]", "hf-libero>=0.1.3,<0.2.0; sys_platform == 'linux'", "lerobot[scipy-dep]"]
|
||||||
robocerebra = ["lerobot[libero]"] # RoboCerebra reuses the LIBERO env (libero_10 suite)
|
|
||||||
metaworld = ["lerobot[dataset]", "metaworld==3.0.0", "lerobot[scipy-dep]"]
|
metaworld = ["lerobot[dataset]", "metaworld==3.0.0", "lerobot[scipy-dep]"]
|
||||||
|
|
||||||
# All
|
# All
|
||||||
|
|||||||
Reference in New Issue
Block a user