Setup and System Requirements
This guide summarizes the setup process for installing Cosmos Reason2 on Ubuntu Linux with an NVIDIA GPU, using uv for dependency management, and running notebooks via JupyterLab with a dedicated kernel.
1) System prerequisites (Ubuntu)
Install required system packages:
Verify your GPU + NVIDIA driver + CUDA support:
Note: This recipe was tested on a laptop with an NVIDIA RTX PRO 5000 Blackwell GPU running Ubuntu 24.04 and supporting CUDA 13.0. For configuration, we use the cu130 environment extra. You may need to adjust the CUDA version based on your system.
2) Install uv (one-time, per user)
Install uv (Astral):
3) Clone the Cosmos Reason2 repository
REPO_ROOT=/path/to/your/preferred/projects/directory # e.g., $HOME/Documents/GitHub or $HOME/projects
mkdir -p "$REPO_ROOT"
cd "$REPO_ROOT"
git clone https://github.com/nvidia-cosmos/cosmos-reason2.git
cd cosmos-reason2
git lfs pull
4) Authenticate with Hugging Face (required for model downloads)
5) Create the Cosmos Reason2 environment (CUDA 13.0)
Create the environment and install dependencies (this creates ./.venv inside the repo):
Activate the environment:
Verify PyTorch + CUDA availability:
Expected:
cuda True
6) Install additional packages in the same environment
Install FiftyOne
Install JupyterLab + kernel support
7) Register the environment as a Jupyter kernel (findable in JupyterLab)
Register this environment so it appears as a selectable kernel:
Confirm it exists:
You should see something like:
8) Run JupyterLab and select the correct kernel
Start JupyterLab (recommended from the repo root):
In the JupyterLab UI:
- Kernel → Change Kernel →
Python (cosmos-reason2)
9) Running scripts from inside a notebook (important)
If your notebook lives in:
and you run:
the script will run relative to the notebook directory, which can affect paths.
Recommended way (run from repo root)
Run the script from the repo root in one line:
Or in two steps:
This ensures the script uses the correct repo-relative paths.
Quick troubleshooting notes
- If port conflicts happen (e.g.
Address already in use), try a different port for local services. - If video decoding fails, ensure
ffmpegis installed system-wide and available viaffmpeg -version.
Done! You now have:
- a dedicated
cosmos-reason2Python environment (.venv) - Cosmos Reason2 and all granted models from Hugging Face (per the Cosmos Reason2 repo)
- FiftyOne installed inside that env
- JupyterLab installed inside that env
- a selectable kernel in JupyterLab: Python (cosmos-reason2)