Skip to content

Setup Guide

Complete all steps below before continuing with the post-training tutorial. This guide assumes you have already cloned the repositories in step 1.1 and step 1.3.

System Requirements

  • NVIDIA GPUs with Ampere architecture (RTX 30 Series, A100) or newer
  • NVIDIA driver >=570.124.06 compatible with CUDA 12.8.1
  • Linux x86-64
  • glibc >= 2.35 (e.g., Ubuntu >= 22.04)
  • Python 3.10

Installation

Install system dependencies:

sudo apt install curl ffmpeg parallel tree wget

Install uv:

curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env

From the Cosmos-H-Surgical-Simulator repo cloned in step 1.3, install the package into a new environment:

cd $COSMOS_CODE_PATH   # e.g. /path/to/Cosmos-H-Surgical-Simulator
uv sync --extra=cu128
source .venv/bin/activate

Or, install the package into the active environment (e.g. conda):

cd $COSMOS_CODE_PATH
uv sync --extra=cu128 --active --inexact

For the SutureBot→LeRobot conversion and inference scripts, install additional dependencies:

uv pip install lerobot==0.3.3 mediapy torchcodec tyro

CUDA variants:

  • --extra=cu128: CUDA 12.8
  • --extra=cu129: CUDA 12.9

Downloading Checkpoints

  1. Get a Hugging Face Access Token with Read permission
  2. Install Hugging Face CLI: uv tool install -U "huggingface_hub[cli]"
  3. Login: hf auth login
  4. Accept the NVIDIA Open Model License Agreement.

Checkpoints are automatically downloaded during inference and post-training. To modify the checkpoint cache location, set the HF_HOME environment variable.

Next Steps

Once this setup is complete, return to the post-training tutorial and continue from step 1.5 Build the Docker Image (for Containerized Runs) onward.