Files
lerobot/docker
Pepijn c505a71f78 fix(ci): address PR review feedback for benchmark smoke tests
Security:
- Remove "Login to Hugging Face" step — it was a no-op (ephemeral
  --rm container) that exposed the HF token via CLI argument in
  docker inspect / /proc/*/cmdline. The eval step already
  re-authenticates via env var.

Functional:
- Remove feat/benchmark-ci from push trigger branches (won't exist
  post-merge).

Dockerfiles:
- Pin uv to 0.8.0 (was unpinned, fetching whatever latest ships).
- Add comment explaining the chmod +x ptxas workaround (Triton
  packaging bug — ships ptxas without execute bit).

Scripts:
- parse_eval_metrics.py: add note that it runs on bare host and must
  stay stdlib-only.
- parse_eval_metrics.py: add NaN guard for avg_sum_reward and eval_s
  (was only guarding pc_success).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 12:48:07 +02:00
..
2026-04-06 12:23:37 +02:00

Docker

This directory contains Dockerfiles for running LeRobot in containerized environments. Both images are built nightly from main and published to Docker Hub with the full environment pre-baked — no dependency setup required.

Pre-built Images

# CPU-only image (based on Dockerfile.user)
docker pull huggingface/lerobot-cpu:latest

# GPU image with CUDA support (based on Dockerfile.internal)
docker pull huggingface/lerobot-gpu:latest

Quick Start

The fastest way to start training is to pull the GPU image and run lerobot-train directly. This is the same environment used for all of our CI, so it is a well-tested, batteries-included setup.

docker run -it --rm --gpus all --shm-size 16gb huggingface/lerobot-gpu:latest

# inside the container:
lerobot-train --policy.type=act --dataset.repo_id=lerobot/aloha_sim_transfer_cube_human

Dockerfiles

Dockerfile.user (CPU)

A lightweight image based on python:3.12-slim. Includes all Python dependencies and system libraries but does not include CUDA — there is no GPU support. Useful for exploring the codebase, running scripts, or working with robots, but not practical for training.

Dockerfile.internal (GPU)

A CUDA-enabled image based on nvidia/cuda. This is the image for training — mostly used for internal interactions with the GPU cluster.

Usage

Running a pre-built image

# CPU
docker run -it --rm huggingface/lerobot-cpu:latest

# GPU
docker run -it --rm --gpus all --shm-size 16gb huggingface/lerobot-gpu:latest

Building locally

From the repo root:

# CPU
docker build -f docker/Dockerfile.user -t lerobot-user .
docker run -it --rm lerobot-user

# GPU
docker build -f docker/Dockerfile.internal -t lerobot-internal .
docker run -it --rm --gpus all --shm-size 16gb lerobot-internal

Multi-GPU training

To select specific GPUs, set CUDA_VISIBLE_DEVICES when launching the container:

# Use 4 GPUs
docker run -it --rm --gpus all --shm-size 16gb \
  -e CUDA_VISIBLE_DEVICES=0,1,2,3 \
  huggingface/lerobot-gpu:latest

USB device access (e.g. robots, cameras)

docker run -it --device=/dev/ -v /dev/:/dev/ --rm huggingface/lerobot-cpu:latest