fix(docker): add CMAKE_POLICY_VERSION_MINIMUM=3.5 for cmake 4.x compat

cmake 4.x removed backward compat with cmake_minimum_required < 3.5,
breaking egl-probe compilation. Setting CMAKE_POLICY_VERSION_MINIMUM=3.5
in the base image ENV re-enables it so robomimic's egl-probe builds.

Also adds --no-cache-base flag to build script so the base can be
force-rebuilt when Dockerfile.eval-base changes, and pins hf-egl-probe
in libero extras as the upstream-fixed fork of egl-probe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Pepijn
2026-03-22 15:45:36 -07:00
parent c35af1ae6a
commit 7be84cb545
3 changed files with 25 additions and 2 deletions
+4 -1
View File
@@ -20,7 +20,10 @@ ARG PYTHON_VERSION=3.12
ENV DEBIAN_FRONTEND=noninteractive \
MUJOCO_GL=egl \
PATH=/lerobot/.venv/bin:$PATH
PATH=/lerobot/.venv/bin:$PATH \
# cmake 4.x removed backward compat with cmake_minimum_required < 3.5.
# This env var re-enables it so packages like egl-probe can compile.
CMAKE_POLICY_VERSION_MINIMUM=3.5
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common build-essential git curl \
+11
View File
@@ -8,6 +8,9 @@
# # Build and push to Docker Hub under your org
# bash docker/build_benchmark_images.sh --push --hub_org=pepijn223
#
# # Force-rebuild base image (e.g. after Dockerfile.eval-base changes)
# bash docker/build_benchmark_images.sh --no-cache-base --push --hub_org=pepijn223
#
# # Build only specific benchmarks
# bash docker/build_benchmark_images.sh --benchmarks="libero_plus robomme"
#
@@ -23,12 +26,14 @@ set -euo pipefail
PUSH=false
HUB_ORG=""
BENCHMARKS="libero libero_plus robomme robocasa"
NO_CACHE_BASE=false
for arg in "$@"; do
case "$arg" in
--push) PUSH=true ;;
--hub_org=*) HUB_ORG="${arg#*=}" ;;
--benchmarks=*) BENCHMARKS="${arg#*=}" ;;
--no-cache-base) NO_CACHE_BASE=true ;;
*) echo "Unknown arg: $arg"; exit 1 ;;
esac
done
@@ -44,8 +49,14 @@ fi
ok() { echo "[OK] $*"; }
fail() { echo "[FAIL] $*"; exit 1; }
BASE_CACHE_FLAG=""
if [[ "$NO_CACHE_BASE" == "true" ]]; then
BASE_CACHE_FLAG="--no-cache"
fi
echo "=== Building lerobot-eval-base ==="
docker build \
${BASE_CACHE_FLAG} \
-f "${SCRIPT_DIR}/Dockerfile.eval-base" \
-t lerobot-eval-base:latest \
"${REPO_ROOT}" || fail "lerobot-eval-base build failed"
+10 -1
View File
@@ -174,7 +174,16 @@ video_benchmark = ["scikit-image>=0.23.2,<0.26.0", "pandas>=2.2.2,<2.4.0"]
# NOTE: Explicitly listing scipy helps flatten the dependecy tree.
aloha = ["gym-aloha>=0.1.2,<0.2.0", "lerobot[scipy-dep]"]
pusht = ["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[transformers-dep]", "hf-libero>=0.1.3,<0.2.0; sys_platform == 'linux'", "lerobot[scipy-dep]"]
libero = [
"lerobot[transformers-dep]",
"hf-libero>=0.1.3,<0.2.0; sys_platform == 'linux'",
# hf-egl-probe is the fixed fork of egl-probe (robomimic transitive dep).
# egl-probe's CMakeLists.txt requires cmake_minimum_required < 3.5 which
# modern cmake rejects. Installing hf-egl-probe first satisfies the egl_probe
# import without source compilation.
"hf-egl-probe>=1.0.1; sys_platform == 'linux'",
"lerobot[scipy-dep]",
]
libero_plus = [
"lerobot[transformers-dep]",
"hf-egl-probe>=1.0.1; sys_platform == 'linux'",