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 namedgr00t-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:/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:-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
Createdocker-compose.yml for easier container management:
Advanced usage
Persistent container
Keep a container running in the background:Environment variables
Pass environment variables:Network configuration
Use host networking for minimal latency:Troubleshooting
GPU not detected
Verify NVIDIA Container Toolkit:nvidia-smi fails inside the container, check:
-
NVIDIA drivers on host:
-
Docker daemon configuration:
Should include:
Permission errors
Add user to docker group:Build failures
Check disk space:Out of memory during build
Increase Docker memory limit in Docker Desktop settings or in/etc/docker/daemon.json:
Container exits immediately
Check logs:Best practices
Use .dockerignore
Create.dockerignore to exclude unnecessary files: