From ba27aab79c731a6b503b2dbdd4c601e78e285048 Mon Sep 17 00:00:00 2001 From: Pepijn <138571049+pkooij@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:51:44 +0200 Subject: [PATCH] fix(robotwin): pin compatible curobo in benchmark image (#3427) * fix(robotwin): pin compatible curobo in benchmark image * fix(robotwin): make curobo smoke check gpu-free --- docker/Dockerfile.benchmark.robotwin | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.benchmark.robotwin b/docker/Dockerfile.benchmark.robotwin index 423854c31..57ee21f4b 100644 --- a/docker/Dockerfile.benchmark.robotwin +++ b/docker/Dockerfile.benchmark.robotwin @@ -56,11 +56,11 @@ RUN uv pip install --no-cache --no-build-isolation \ "git+https://github.com/facebookresearch/pytorch3d.git@stable" # CuRobo — NVlabs motion generator; TORCH_CUDA_ARCH_LIST must be set or the -# build aborts on an empty arch list. Pinned SHA for reproducibility. -ARG CUROBO_SHA=ca941586c33b8482ed9c0e74d60f23efd64b516a +# build aborts on an empty arch list. RoboTwin's own installer pins v0.7.8, +# which still exposes the v1 API (`curobo.types.math`) that RoboTwin imports. +ARG CUROBO_REF=v0.7.8 RUN cd ${ROBOTWIN_ROOT}/envs \ - && git clone https://github.com/NVlabs/curobo.git \ - && git -C curobo checkout ${CUROBO_SHA} \ + && git clone --branch ${CUROBO_REF} --depth 1 https://github.com/NVlabs/curobo.git \ && cd curobo \ && TORCH_CUDA_ARCH_LIST="7.0;7.5;8.0;8.6;8.9;9.0" \ uv pip install -e . --no-build-isolation --no-cache @@ -111,7 +111,23 @@ EOF WORKDIR ${ROBOTWIN_ROOT} RUN python script/update_embodiment_config_path.py -ENV PYTHONPATH="${ROBOTWIN_ROOT}:${PYTHONPATH}" +ENV PYTHONPATH="${ROBOTWIN_ROOT}" + +# Fail the image build early if the CuRobo package layout regresses. Importing +# RoboTwin's planner here is too eager because CuRobo constructs CUDA-backed +# defaults at import time, while Docker builds don't have access to an NVIDIA +# driver. +RUN python - <<'EOF' +from pathlib import Path + +from curobo.types.math import Pose + +planner_src = (Path("/opt/robotwin/envs/robot/planner.py")).read_text() +assert "from curobo.types.math import Pose as CuroboPose" in planner_src + +print("CuRobo import OK:", Pose.__name__) +print("RoboTwin planner import references curobo.types.math") +EOF # Return to the lerobot source directory (set by base image) before overlaying. WORKDIR /lerobot