To install the NVIDIA graphic driver, execute the following commands:
sudo apt-get update
sudo apt install build-essential -y
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/535.129.03/NVIDIA-Linux-x86_64-535.129.03.run
chmod +x NVIDIA-Linux-x86_64-535.129.03.run
sudo ./NVIDIA-Linux-x86_64-535.129.03.run
I tried to install nvidia driver-550, and it also works.
To install Docker, execute the following commands:
# Docker installation using the convenience script
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Post-install steps for Docker
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
# Verify Docker
docker run hello-world
#Configure the repository
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list \
&& \
sudo apt-get update
#Install the NVIDIA Container Toolkit packages
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
#Configure the container runtime
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
#Verify NVIDIA Container Toolkit
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
You can follow this official documentation to get the NGC key.
-
Go to NGC
-
Click on the Setup button on the top right.
-
Click on the Generate API Key button.
-
Copy the API Key.
docker login nvcr.io
Username: $oauthtoken
Password: API key
docker pull nvcr.io/nvidia/isaac-sim:4.0.0
First, set the environment variables to build Docker Image.
export StrideSim_DIR=${PWD}
export DOCKER_NAME=$(whoami)-docker
export DOCKER_PW=a
First, you need to make base image.
cd ${StrideSim_DIR}
docker build -t isaac-sim-ros2:humble-4.0.0 \
--build-arg ROS_DISTRO=humble \
-f docker/Dockerfile.isaacsim-humble .
Then, build StrideSim Docker Image.
cd ${StrideSim_DIR}
docker build -t stride-sim:v0.0.3 \
--build-arg USERNAME=${DOCKER_NAME} \
--build-arg USERPASSWORD=${DOCKER_PW} \
-f docker/Dockerfile.stridesim .
The reason why we need to build base image is to reduce the build time.
Then, you can run StrideSim Docker Container.
docker run --name stride-sim-0.0.3 --entrypoint bash -it --runtime=nvidia --gpus all -e "ACCEPT_EULA=Y" --network=host --privileged \
-e DISPLAY=$DISPLAY \
-e OMNI_KIT_ALLOW_ROOT=1 \
-e RMW_IMPLEMENTATION=rmw_cyclonedds_cpp \
-e ROS_DOMAIN_ID=${ROS_DOMAIN_ID} \
--shm-size=8g \
-m 16g \
--memory-swap 24g \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v ~/docker/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw \
-v ~/docker/isaac-sim/cache/ov:/root/.cache/ov:rw \
-v ~/docker/isaac-sim/cache/pip:/root/.cache/pip:rw \
-v ~/docker/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw \
-v ~/docker/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw \
-v ~/docker/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw \
-v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \
-v ~/docker/isaac-sim/documents:/root/Documents:rw \
-v ${StrideSim_DIR}:/StrideSim:rw \
-v /dev/shm:/dev/shm \
stride-sim:v0.0.3
# It takes a long time to run the first time about 10 minutes.
cd /isaac-sim
find . -print0 | parallel -0 --jobs +0 --bar chmod 777 {}
Now you can run StrideSim Docker Container.
It contains the Isaac Sim, StrideSim, IsaacLab and ROS2 Humble!!
You can run the following command to run isaac-sim.
cd /isaac-sim
./isaac-sim.sh
ENJOY!
- /isaac-sim
- /StrideSim
- /IsaacLab
- /opt/ros/humble
If you encounter "out of memory" errors:
- Increase shared memory size:
sudo mount -o remount,size=8G /dev/shm
- Verify system resources before running:
free -h
nvidia-smi
- If using ROS2 bridge, try switching DDS implementation:
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
If Isaac Sim crashes during startup:
- Clear cached data:
rm -rf ~/docker/isaac-sim/cache/*
- Run with reduced graphics settings:
./isaac-sim.sh --headless
Back to README
- Get ROS2 Topic from StrideSim
The StrideSim container runs with administrative privileges. To receive ROS2 messages published by processes within this container, administrative permissions are required. You can choose one of the following methods, command below in host environment:
- Use an administrator prompt.
$ sudo su
# source /opt/ros/humble/setup.bash
# ros2 topic list
- Set permissions for /dev/shm.
$ sudo chmod -R 777 /dev/shm