Skip to content

Commit

Permalink
sim
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Mar 31, 2024
1 parent 50cf380 commit 16f26df
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 40 deletions.
68 changes: 68 additions & 0 deletions sim/scripts/install_isaac_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/bin/bash
# Script to set up Isaac Sim on a cluster.
# This script was adapted from here:
# https://docs.omniverse.nvidia.com/isaacsim/latest/installation/install_container.html

set -e

# Create a directory for installation artifacts.
build_dir=$(pwd)build/sim/
mkdir -p ${build_dir}

showmsg() {
echo -e "\e[1;32m$1\e[0m"
}

showmsg "Updating and installing dependencies..."
sudo apt-get update
sudo apt install build-essential -y

# Install NVIDIA drivers. This shouldn't be necessary since the cluster
# already has NVIDIA drivers installed.
# if [[ ! -f ${build_dir}/NVIDIA-Linux-x86_64-525.85.05.run ]]; then
# showmsg "Downloading NVIDIA drivers..."
# wget https://us.download.nvidia.com/XFree86/Linux-x86_64/525.85.05/NVIDIA-Linux-x86_64-525.85.05.run -P ${build_dir}
# chmod +x ${build_dir}/NVIDIA-Linux-x86_64-525.85.05.run
# sudo ${build_dir}/NVIDIA-Linux-x86_64-525.85.05.run
# fi

# Docker installation using the convenience script
if [[ ! -f /usr/bin/docker ]]; then
showmsg "Installing Docker..."
curl -fsSL https://get.docker.com -o ${build_dir}get-docker.sh
sudo sh ${build_dir}get-docker.sh

showmsg "Post-install steps for Docker..."
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

showmsg "Verifying Docker installation..."
docker run hello-world
fi

# Configure the repository
if [[ ! -f /etc/apt/sources.list.d/nvidia-container-toolkit.list ]]; then
showmsg "Configuring the NVIDIA Container Toolkit repository..."
if [[ ! -f /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg ]]; then
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
fi
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

showmsg "Updating the package list..."
sudo apt-get update

showmsg "Installing NVIDIA Container Toolkit..."
sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker
fi

showmsg "Verifying NVIDIA Container Toolkit..."
docker run --rm --gpus all ubuntu nvidia-smi

showmsg "Installing NVIDIA Container Runtime..."
docker login nvcr.io
docker pull nvcr.io/nvidia/isaac-sim:2023.1.1
14 changes: 14 additions & 0 deletions sim/scripts/run_headless.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
# Runs Isaac in headless mode.

docker run --name isaac-sim --entrypoint bash -it --gpus all -e "ACCEPT_EULA=Y" --rm --network=host \
-e "PRIVACY_CONSENT=Y" \
-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 \
nvcr.io/nvidia/isaac-sim:2023.1.1
40 changes: 0 additions & 40 deletions sim/scripts/setup_isaac.sh

This file was deleted.

0 comments on commit 16f26df

Please sign in to comment.