Commit fe8c263a authored by Kelly Guo's avatar Kelly Guo Committed by Kelly Guo

Updates app files and documentation to support Isaac Lab pip installation (#222)

# Description

To support the new way of installing Isaac Lab through pip, we need to
add all Isaac Lab extensions as dependencies into the app files.
This change also adds documentation for when this can be used and how to
install Isaac Lab with pip.

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- New feature (non-breaking change which adds functionality)
- This change requires a documentation update


## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [ ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->
parent 0e5f0389
......@@ -29,7 +29,6 @@ app.version = "4.5.0"
"omni.kit.telemetry" = {}
"omni.kit.loop" = {}
[settings]
app.content.emptyStageOnStart = false
......@@ -179,3 +178,13 @@ enabled=true # Enable this for DLSS
"isaacsim.core.cloner" = {}
"isaacsim.core.utils" = {}
"isaacsim.core.version" = {}
########################
# Isaac Lab Extensions #
########################
"isaaclab" = {}
"isaaclab_assets" = {}
"isaaclab_tasks" = {}
"isaaclab_mimic" = {}
"isaaclab_rl" = {}
......@@ -99,6 +99,16 @@ keywords = ["experience", "app", "usd"]
"omni.usd.schema.metrics.assembler" = {}
"omni.warp.core" = {}
########################
# Isaac Lab Extensions #
########################
"isaaclab" = {}
"isaaclab_assets" = {}
"isaaclab_tasks" = {}
"isaaclab_mimic" = {}
"isaaclab_rl" = {}
[settings]
exts."omni.kit.material.library".ui_show_list = [
"OmniPBR",
......
......@@ -138,6 +138,7 @@ SKRL
It is recommended to `install JAX <https://jax.readthedocs.io/en/latest/installation.html>`_ manually before proceeding to install skrl and its dependencies, as JAX installs its CPU version by default. For example, ``pip install -U "jax[cuda12]"`` can be used to install JAX for CUDA 12.
Visit the **skrl** `installation <https://skrl.readthedocs.io/en/latest/intro/installation.html>`_ page for more details.
Note that JAX GPU support is only available on Linux.
.. code:: bash
......
......@@ -3,7 +3,7 @@
Installation using Isaac Sim Binaries
=====================================
Issac Lab requires Isaac Sim. Install Isaac Sim first, then Isaac Lab.
Isaac Lab requires Isaac Sim. This tutorial installs Isaac Sim first from binaries, then Isaac Lab from source code.
Installing Isaac Sim
--------------------
......
......@@ -32,8 +32,30 @@ Local Installation
`Isaac Sim system requirements <https://docs.omniverse.nvidia.com/isaacsim/latest/installation/requirements.html#system-requirements>`_.
Isaac Lab is built on top of the Isaac Sim platform. Therefore, it is required to first install Isaac Sim
before using Isaac Lab.
Both Isaac Sim and Isaac Lab provide two ways of installation:
either through binary download/source file, or through Python's package installer ``pip``.
The method of installation may depend on the use case and the level of customization desired from users.
For example, installing Isaac Sim from pip will be a simpler process than installing it from binaries,
but the source code will then only be accessible through the installed source package and not through the direct binary download.
Similarly, installing Isaac Lab through pip is only recommended for workflows that use external launch scripts outside of Isaac Lab.
The Isaac Lab pip packages only provide the core framework extensions for Isaac Lab and does not include any of the
standalone training, inferencing, and example scripts. Therefore, this workflow is recommended for projects that are
built as external extensions outside of Isaac Lab, which utilizes user-defined runner scripts.
For Ubuntu 22.04 and Windows systems, we recommend using Isaac Sim pip installation.
For Ubuntu 20.04 systems, we recommend installing Isaac Sim through binaries.
For users getting started with Isaac Lab, we recommend installing Isaac Lab by cloning the repo.
.. toctree::
:maxdepth: 2
Pip installation (recommended for Ubuntu 22.04 and Windows) <pip_installation>
Binary installation (recommended for Ubuntu 20.04) <binaries_installation>
Advanced installation (Isaac Lab pip) <isaaclab_pip_installation>
Installing Isaac Lab through Pip
================================
From Isaac Lab 2.0, pip packages are provided to install both Isaac Sim and Isaac Lab extensions from pip.
Note that this installation process is only recommended for advanced users working on additional extension projects
that are built on top of Isaac Lab. Isaac Lab pip packages **do not** include any standalone python scripts for
training, inferencing, or running standalone workflows such as demos and examples. Therefore, users are required
to define your own runner scripts when installing Isaac Lab from pip.
To learn about how to set up your own extension project on top of Isaac Lab, visit `Extension Template <../../overview/developer-guide/template.html>`_.
.. note::
If you use Conda, we recommend using `Miniconda <https://docs.anaconda.com/miniconda/miniconda-other-installer-links/>`_.
- To use the pip installation approach for Isaac Lab, we recommend first creating a virtual environment.
Ensure that the python version of the virtual environment is **Python 3.10**.
.. tab-set::
.. tab-item:: conda environment
.. code-block:: bash
conda create -n env_isaaclab python=3.10
conda activate env_isaaclab
.. tab-item:: venv environment
.. tab-set::
:sync-group: os
.. tab-item:: :icon:`fa-brands fa-linux` Linux
:sync: linux
.. code-block:: bash
# create a virtual environment named env_isaaclab with python3.10
python3.10 -m venv env_isaaclab
# activate the virtual environment
source env_isaaclab/bin/activate
.. tab-item:: :icon:`fa-brands fa-windows` Windows
:sync: windows
.. code-block:: batch
# create a virtual environment named env_isaaclab with python3.10
python3.10 -m venv env_isaaclab
# activate the virtual environment
env_isaaclab\Scripts\activate
- Next, install a CUDA-enabled PyTorch 2.5.1 build based on the CUDA version available on your system. This step is optional for Linux, but required for Windows to ensure a CUDA-compatible version of PyTorch is installed.
.. tab-set::
.. tab-item:: CUDA 11
.. code-block:: bash
pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cu118
.. tab-item:: CUDA 12
.. code-block:: bash
pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cu121
- Before installing Isaac Lab, ensure the latest pip version is installed. To update pip, run
.. tab-set::
:sync-group: os
.. tab-item:: :icon:`fa-brands fa-linux` Linux
:sync: linux
.. code-block:: bash
pip install --upgrade pip
.. tab-item:: :icon:`fa-brands fa-windows` Windows
:sync: windows
.. code-block:: batch
python -m pip install --upgrade pip
- Then, install the Isaac Lab packages, this will also install Isaac Sim.
.. code-block:: none
pip install isaaclab[isaacsim,all]==2.0.0 --extra-index-url https://pypi.nvidia.com
Verifying the Isaac Sim installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Make sure that your virtual environment is activated (if applicable)
- Check that the simulator runs as expected:
.. code:: bash
# note: you can pass the argument "--help" to see all arguments possible.
isaacsim
- It's also possible to run with a specific experience file, run:
.. code:: bash
# experience files can be absolute path, or relative path searched in isaacsim/apps or omni/apps
isaacsim isaacsim.exp.full.kit
.. attention::
When running Isaac Sim for the first time, all dependent extensions will be pulled from the registry.
This process can take upwards of 10 minutes and is required on the first run of each experience file.
Once the extensions are pulled, consecutive runs using the same experience file will use the cached extensions.
.. attention::
The first run will prompt users to accept the Nvidia Omniverse License Agreement.
To accept the EULA, reply ``Yes`` when prompted with the below message:
.. code:: bash
By installing or using Isaac Sim, I agree to the terms of NVIDIA OMNIVERSE LICENSE AGREEMENT (EULA)
in https://docs.omniverse.nvidia.com/isaacsim/latest/common/NVIDIA_Omniverse_License_Agreement.html
Do you accept the EULA? (Yes/No): Yes
If the simulator does not run or crashes while following the above
instructions, it means that something is incorrectly configured. To
debug and troubleshoot, please check Isaac Sim
`documentation <https://docs.omniverse.nvidia.com/dev-guide/latest/linux-troubleshooting.html>`__
and the
`forums <https://docs.omniverse.nvidia.com/isaacsim/latest/isaac_sim_forums.html>`__.
Running Isaac Lab Scripts
~~~~~~~~~~~~~~~~~~~~~~~~~
By following the above scripts, your python environment should now have access to all of the Isaac Lab extensions.
To run a user-defined script for Isaac Lab, simply run
.. code:: bash
python my_awesome_script.py
.. _isaaclab-pip-installation:
Installation using pip
Installation using Isaac Sim pip
================================
Issac Lab requires Isaac Sim. Install Isaac Sim first, then Isaac Lab.
Isaac Lab requires Isaac Sim. This tutorial first installs Isaac Sim from pip, then Isaac Lab from source code.
Installing Isaac Sim
--------------------
From Isaac Sim 4.0 release, it is possible to install Isaac Sim using pip. This approach is experimental and may have
compatibility issues with some Linux distributions. If you encounter any issues, please report them to the
From Isaac Sim 4.0 release, it is possible to install Isaac Sim using pip.
This approach makes it easier to install Isaac Sim without requiring to download the Isaac Sim binaries.
If you encounter any issues, please report them to the
`Isaac Sim Forums <https://docs.omniverse.nvidia.com/isaacsim/latest/common/feedback.html>`_.
.. attention::
......
......@@ -18,7 +18,7 @@ import time
from isaaclab.app import AppLauncher
import scripts.workflows.rsl_rl.cli_args as cli_args # isort: skip
import scripts.reinforcement_learning.rsl_rl.cli_args as cli_args # isort: skip
# add argparse arguments
parser = argparse.ArgumentParser(description="Train an RL agent with RSL-RL.")
......
......@@ -38,4 +38,4 @@ modules = [
use_online_index=true
[[python.module]]
name = "isaaclab_tasks"
name = "isaaclab_rl"
......@@ -350,8 +350,9 @@ def warm_start_app():
capture_output=True,
)
if len(warm_start_output.stderr) > 0:
logging.error(f"Error warm starting the app: {str(warm_start_output.stderr)}")
exit(1)
if "DeprecationWarning" not in str(warm_start_output.stderr):
logging.error(f"Error warm starting the app: {str(warm_start_output.stderr)}")
exit(1)
# headless experience with rendering
warm_start_rendering_output = subprocess.run(
......@@ -366,8 +367,9 @@ def warm_start_app():
capture_output=True,
)
if len(warm_start_rendering_output.stderr) > 0:
logging.error(f"Error warm starting the app with rendering: {str(warm_start_rendering_output.stderr)}")
exit(1)
if "DeprecationWarning" not in str(warm_start_rendering_output.stderr):
logging.error(f"Error warm starting the app with rendering: {str(warm_start_rendering_output.stderr)}")
exit(1)
after = time.time()
time_elapsed = after - before
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment