Installation with Docker#

Install docker#

Ref https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_container.html

# 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

Install the NVIDIA Container Toolkit:#

# 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

# ntainer Toolkit
docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi

Login to nvidia NGC#

docker login nvcr.io

# username: $oauthtoken
# Password: <Your NGC API Key>

Build docker image#

change your image name below, e.g., dev:20241018

cd .../RoboVerse/docker
git clone git@github.com:isaac-sim/IsaacLab.git
cd IsaacLab
git checkout 4d9914702  # Ensure reproducibility
docker build -t rv:20250113 .

If you are behind the GFW, please setup proxy following guide at the end of this doc.

Start docker container#

docker run --name rv_0 -it --runtime=nvidia --gpus "device=0" --rm --network=host \
  -v YOUR_PATH_TO/RoboVerse:/root/Projects/RoboVerse:rw \
  -v YOUR_PATH_TO/anaconda3/envs:/data/miniconda3/envs:rw \
  -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/carb/logs:/isaac-sim/kit/logs/Kit/Isaac-Sim:rw \
  -v ~/docker/isaac-sim/data:/root/.local/share/ov/data:rw \
  -v ~/docker/isaac-sim/documents:/root/Documents:rw \
  -v ~/docker/isaac-lab/docs:/workspace/isaaclab/docs/_build:rw \
  -v ~/docker/isaac-lab/logs:/workspace/isaaclab/logs:rw \
  -v ~/docker/isaac-lab/data:/workspace/isaaclab/data_storage:rw \
  rv:20250113 # your docker name

Setup docker proxies (only for those behind the GFW, e.g. Chinese Users)#

  1. Setup local Clash proxy and use your local ipv4 address. DO NOT SET IP ADDRESS TO 127.0.0.1! It is used when docker build.

    # vim ~/.docker/config.json
    "proxies": {
        "default": {
            "httpProxy": "http://192.168.1.55:7890",
            "httpsProxy": "http://192.168.1.55:7890",
            "allProxy": "socks5://192.168.1.55:7890",
            "noProxy": "192.168.1.55/8"
        }
    }
    
  2. Setup proxy mirros used when docker pull, etc

    # sudo vim /etc/docker/daemon.json
    {
        ...
        "registry-mirrors": [
            "https://mirror.ccs.tencentyun.com",
            "https://05f073ad3c0010ea0f4bc00b7105ec20.mirror.swr.myhuaweicloud.com",
            "https://registry.docker-cn.com",
            "http://hub-mirror.c.163.com",
            "http://f1361db2.m.daocloud.io"
        ]
    }
    
  3. Turn on clash to allow LAN

    # vim ~/Clash/config.yaml
    allow-lan: true
    
    # test in your terminal
    export HOST_IP=192.168.61.221
    export all_proxy=socks5://${HOST_IP}:7890
    export all_proxy=socks5://${HOST_IP}:7890
    export https_proxy=http://${HOST_IP}:7890
    export http_proxy=http://${HOST_IP}:7890
    export no_proxy=localhost,${HOST_IP}/8,::1
    export ftp_proxy=http://${HOST_IP}:7890/
    
    # check env variables are set
    env | grep proxy
    
    # test connection
    curl -I https://www.google.com
    
  4. Try to uncomment the lines in dockerfile which changes ubuntu apt sources to aliyun.

    # Change apt source if you encouter connection issues
    RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list && \
        sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
    
  5. Restart docker [and then build again]

    sudo systemctl daemon-reload
    sudo systemctl restart docker
    
  6. If still not work, add following building options to docker build

     ...
     --build-arg http_proxy=http://192.168.1.55:7890 \
     --build-arg https_proxy=http://192.168.1.55:7890 \
     ...
    

Install Diffusion Policy#

omni_python -m pip install pip --upgrade
cd roboverse_learn/algorithms/diffusion_policy
omni_python -m pip install -e .
cd ../../..