The docker-compose.yaml file defines the service isaac-lab-template used to run the extension template in a containerized environment. It relies on several environment variables and build arguments to map the local source code into the container.
Key Configuration Details
- Build Arguments: During the build process, the following arguments are passed to the
Dockerfile:ISAACLAB_BASE_IMAGE_ARG: Set via the ${ISAACLAB_BASE_IMAGE} environment variable.DOCKER_ISAACLAB_EXTENSION_TEMPLATE_PATH_ARG: Set via the ${DOCKER_ISAACLAB_EXTENSION_TEMPLATE_PATH} environment variable.
- Volumes: The project root (
../) is bind-mounted to the path specified by ${DOCKER_ISAACLAB_EXTENSION_TEMPLATE_PATH} inside the container. - Environment Variables:
- Uses an
.env.base file for environment configuration. - Sets
OMNI_KIT_ALLOW_ROOT=1 by default.
- Hardware Requirements: The service uses the
nvidia driver with count: all and capabilities: [ gpu ] to ensure GPU access. - Network: Uses
network_mode: host. - Container Interaction: The container is configured with
entrypoint: bash, stdin_open: true, and tty: true to allow interactive shell access.
services:
isaac-lab-template:
env_file: .env.base
build:
context: ../
dockerfile: docker/Dockerfile
args:
- ISAACLAB_BASE_IMAGE_ARG=${ISAACLAB_BASE_IMAGE}
- DOCKER_ISAACLAB_EXTENSION_TEMPLATE_PATH_ARG=${DOCKER_ISAACLAB_EXTENSION_TEMPLATE_PATH}
image: isaac-lab-template
container_name: isaac-lab-template
volumes:
- type: bind
source: ../
target: ${DOCKER_ISAACLAB_EXTENSION_TEMPLATE_PATH}
network_mode: host
environment:
- OMNI_KIT_ALLOW_ROOT=1
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
entrypoint: bash
stdin_open: true
tty: true