Skip to main content
Run GR00T in a Docker container with all dependencies pre-configured, including CUDA support, PyTorch, PyTorch3D, and the complete GR00T codebase.

Prerequisites

Building the image

The Docker image is based on NVIDIA’s PyTorch container (nvcr.io/nvidia/pytorch:25.04-py3) and includes all GR00T dependencies.

Build command

From the project root:
Make sure you are using a bash environment. The build process will take several minutes and requires several GB of disk space.

Build output

The build creates an image named gr00t-dev with:
  • NVIDIA PyTorch 25.04 base
  • CUDA 12.x support
  • Python 3.10
  • PyTorch3D
  • All dependencies from pyproject.toml
  • GR00T codebase at /workspace/gr00t/

Rebuild with no cache

Force a clean rebuild:

Running the container

Interactive shell (baked code)

Run with the code baked into the image:
This starts an interactive shell in /workspace/gr00t/ with all dependencies ready.

Development mode (mounted code)

Mount your local codebase for live editing:
Changes to your local GR00T code will be immediately reflected inside the container. This is ideal for development and debugging.

Custom working directory

Start in a specific directory:

Running inference in Docker

Start policy server

Run the GR00T server inside the container:
The -p 5555:5555 flag exposes the server port to the host machine.

Run inference script

Execute standalone inference:

Mount datasets

Mount external data directories:

Training in Docker

Mount output directory

Multi-GPU training

Specify GPU devices:

Docker Compose

Create docker-compose.yml for easier container management:
Launch with:

Advanced usage

Persistent container

Keep a container running in the background:
Execute commands in the running container:
Stop and remove:

Environment variables

Pass environment variables:

Network configuration

Use host networking for minimal latency:
Host networking removes network isolation. Only use on trusted networks.

Troubleshooting

GPU not detected

Verify NVIDIA Container Toolkit:
Restart Docker daemon:
Test GPU access:
If nvidia-smi fails inside the container, check:
  1. NVIDIA drivers on host:
  2. Docker daemon configuration:
    Should include:

Permission errors

Add user to docker group:
Or run with sudo:

Build failures

Check disk space:
Clean Docker cache:
Rebuild without cache:

Out of memory during build

Increase Docker memory limit in Docker Desktop settings or in /etc/docker/daemon.json:
Restart Docker:

Container exits immediately

Check logs:
Run with verbose output:

Best practices

Use .dockerignore

Create .dockerignore to exclude unnecessary files:

Tag images by version

Resource limits

Limit container resources:

Clean up unused images

Remove old images:

Deployment scenarios

Cloud deployment (AWS, GCP, Azure)

Push image to container registry:
Run on cloud GPU instance:

Kubernetes deployment

Create deployment manifest:

CI/CD integration

Use in automated testing: