mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-19 18:49:52 +00:00
feat(docker): add per-benchmark evaluation containers
Add Dockerfile.benchmark (parameterized via ARG BENCHMARK), a
docker-compose.benchmark.yml with services for libero, libero_plus,
robomme, and robocasa, and a smoke_test_benchmark.sh that verifies
imports and CLI entry-points in each container.
Also add the missing `robocasa` optional dep group to pyproject.toml
(the docs already referenced `pip install ".[robocasa]"` but the group
was not defined).
Build a specific benchmark image:
docker build --build-arg BENCHMARK=robomme \
-f docker/Dockerfile.benchmark -t lerobot-benchmark-robomme .
Build all via compose:
docker compose -f docker/docker-compose.benchmark.yml build
Smoke-test inside a container:
docker compose -f docker/docker-compose.benchmark.yml run --rm robomme \
bash docker/smoke_test_benchmark.sh
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
# Benchmark evaluation services for LeRobot.
|
||||
#
|
||||
# Each service builds Dockerfile.benchmark with the matching BENCHMARK arg,
|
||||
# giving an isolated environment per benchmark suite.
|
||||
#
|
||||
# Usage:
|
||||
# Build all: docker compose -f docker/docker-compose.benchmark.yml build
|
||||
# Build one: docker compose -f docker/docker-compose.benchmark.yml build libero
|
||||
# Run smoke tests: docker compose -f docker/docker-compose.benchmark.yml run --rm libero bash docker/smoke_test_benchmark.sh
|
||||
# Interactive: docker compose -f docker/docker-compose.benchmark.yml run --rm libero
|
||||
|
||||
x-benchmark-base: &benchmark-base
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.benchmark
|
||||
image: lerobot-benchmark-${BENCHMARK:-libero}
|
||||
environment:
|
||||
- MUJOCO_GL=egl
|
||||
- DEVICE=cuda
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
volumes:
|
||||
# Mount HuggingFace cache from host so model weights are not re-downloaded each run.
|
||||
- ${HF_HOME:-~/.cache/huggingface}:/home/user_lerobot/.cache/huggingface
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
services:
|
||||
libero:
|
||||
<<: *benchmark-base
|
||||
image: lerobot-benchmark-libero
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.benchmark
|
||||
args:
|
||||
BENCHMARK: libero
|
||||
|
||||
libero_plus:
|
||||
<<: *benchmark-base
|
||||
image: lerobot-benchmark-libero-plus
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.benchmark
|
||||
args:
|
||||
BENCHMARK: libero_plus
|
||||
|
||||
robomme:
|
||||
<<: *benchmark-base
|
||||
image: lerobot-benchmark-robomme
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.benchmark
|
||||
args:
|
||||
BENCHMARK: robomme
|
||||
|
||||
robocasa:
|
||||
<<: *benchmark-base
|
||||
image: lerobot-benchmark-robocasa
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.benchmark
|
||||
args:
|
||||
BENCHMARK: robocasa
|
||||
Reference in New Issue
Block a user