Skip to content

Toni-SM/semu.misc.jupyter_notebook

Repository files navigation

Embedded Jupyter Notebook for NVIDIA Omniverse


This extension is deprecated in favor of omni.isaac.jupyter_notebook

See more details in Isaac Sim docs.


This extension can be described as the Jupyter notebook version of Omniverse's Script Editor. It allows to open a Jupyter Notebook embedded in the current NVIDIA Omniverse application scope.


Target applications: Any NVIDIA Omniverse app

Supported OS: Windows and Linux

Changelog: CHANGELOG.md

Table of Contents:


showcase


Extension setup

  1. Add the extension using the Extension Manager or by following the steps in Extension Search Paths

    • Git url (git+https) as extension search path

      git+https://github.com/Toni-SM/semu.misc.jupyter_notebook.git?branch=main&dir=exts
      
    • Compressed (.zip) file for import

      semu.misc.jupyter_notebook.zip

  2. Enable the extension using the Extension Manager or by following the steps in Extension Enabling/Disabling

Troubleshooting

  • Failed installation (particularly in Kit 105 based applications - Python 3.10)

    Issues/Errors:

    [Warning] [omni.kit.pipapi.pipapi] 'jupyterlab' failed to install.
    [Warning] [omni.kit.pipapi.pipapi] 'notebook' failed to install.

    Solution:

    Upgrade pip to the latest version and install required libraries manually. Replace <USER>, <OMNIVERSE_APP>, <APP_NAME>, and <APP_VERSION> according to your system configuration. Example:

    • <USER>: toni
    • <OMNIVERSE_APP>: create-2023.1.1
    • <APP_NAME>: USD.Composer
    • <APP_VERSION>: 2023.1

    Linux

    /home/<USER>/.local/share/ov/pkg/<OMNIVERSE_APP>/kit/python/bin/python3 -m pip install --upgrade pip
    /home/<USER>/.local/share/ov/pkg/<OMNIVERSE_APP>/kit/python/bin/python3 -m pip --isolated install --upgrade --target=/home/<USER>/.local/share/ov/data/Kit/<APP_NAME>/<APP_VERSION>/pip3-envs/default jupyterlab notebook jedi

    Windows

    C:\Users\<USER>\AppData\Local\ov\pkg\<OMNIVERSE_APP>\kit\python\python.exe -m pip install --upgrade pip
    C:\Users\<USER>\AppData\Local\ov\pkg\<OMNIVERSE_APP>\kit\python\python.exe -m pip --isolated install --upgrade --target=C:\Users\<USER>\AppData\Local\ov\data\Kit\<APP_NAME>\<APP_VERSION>\pip3-envs\default jupyterlab notebook jedi

Extension usage

Omniverse app

Enabling the extension launches the Jupyter Notebook server (JupyterLab or Jupyter Notebook) in the background. The notebook can then be opened in the browser via its URL (http://WORKSTATION_IP:PORT/), which is also indicated inside the Omniverse application in the Windows > Embedded Jupyter Notebook menu.

Note: The Jupyter Notebook URL port may change if the configured port is already in use.


Disabling the extension shutdowns the Jupyter Notebook server and the openened kernels.

Jupyter Notebook

To execute Python code in the current NVIDIA Omniverse application scope use the following kernel:


Embedded Omniverse (Python 3)

Code autocompletion

Use the Tab key for code autocompletion.

Code introspection

Use the Ctrl + i keys for code introspection (display docstring if available).


Configuring the extension

The extension can be configured by editing the config.toml file under [settings] section. The following parameters are available:


Extension settings

Parameter Value Description
socket_port 8224 The port on which the Jupyter Notebook server will be listening for connections
classic_notebook_interface false Whether the Jupyter Notebook server will use the JupyterLab interface (default interface) or the classic Jupyter Notebook interface
kill_processes_with_port_in_use true Whether to kill applications/processes that use the same ports (8224 and 8225 by default) before activating the extension. Disable this option if you want to launch multiple applications that have this extension active

Jupyter Notebook server settings

Parameter Value Description
notebook_ip "0.0.0.0" The IP address on which the Jupyter Notebook server will be launched
notebook_port 8225 The port on which the Jupyter Notebook server will be launched. If the port is already in use, the server will be launched on a different incrementing port
token "" The Jupyter Notebook server token. If empty, the default configuration, the server will be launched without authentication
notebook_dir "" The Jupyter Notebook server directory
command_line_options "--allow-root --no-browser" The Jupyter Notebook server command line options excluding the previously mentioned parameters

Implementation details

Both the Jupyter Notebook server and the IPython kernels are designed to be launched as independent processes (or subprocesses). Due to this specification, the Jupyter Notebook server and the IPython kernels are launched in separate (sub)processes.


Jupyter Notebook as (sub)process
Kernel (display name) Embedded Omniverse (Python 3)
Kernel (logo)

Kernel (raw name) embedded_omniverse_python3_socket
Instanceable kernels Unlimited
Python backend Omniverse Kit embedded Python
Code execution Intercept Jupyter-IPython communication, forward and execute code in Omniverse Kit and send back the results to the published by the notebook
Main limitations
  • IPython magic commands are not available
  • Printing, inside callbacks, is not displayed in the notebook but in the Omniverse terminal
  • Matplotlib plotting is not available in notebooks