-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Adds installation tests for conda/uv/modularized installation #5563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
c1d8ae5
cda3a84
863b01e
303e56b
4eabab1
d2e488b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| # Conda-enabled container for testing Isaac Lab installation scenarios. | ||
| # Built on top of Dockerfile.installci (the uv image) so that all system | ||
| # dependencies, uv, the repo copy, and pytest are already present. | ||
| # Only Miniconda is added here. | ||
| # | ||
| # The runner script (tools/run_install_ci.py) builds Dockerfile.installci | ||
| # first and then passes the resulting tag as UV_IMAGE when building this file. | ||
| # | ||
| # Manual usage (from repo root): | ||
| # # 1. Build the uv base image first: | ||
| # docker build -f docker/Dockerfile.installci -t isaaclab-installci:ubuntu-24.04 . | ||
| # # 2. Build the conda image on top: | ||
| # docker build -f docker/Dockerfile.installci-conda \ | ||
| # --build-arg UV_IMAGE=isaaclab-installci:ubuntu-24.04 \ | ||
| # -t isaaclab-installci-conda . | ||
| # # Run: | ||
| # docker run --rm --gpus all isaaclab-installci-conda -v --tb=short | ||
| # # Drop into a shell for debugging: | ||
| # docker run --rm -it --entrypoint bash isaaclab-installci-conda | ||
|
|
||
| ARG UV_IMAGE=isaaclab-installci:ubuntu-24.04 | ||
| FROM ${UV_IMAGE} | ||
|
|
||
| LABEL description="Container for conda-based installation CI tests." | ||
|
|
||
| # Install Miniconda — select the correct installer for the build platform. | ||
| # $(uname -m) returns x86_64 on amd64 and aarch64 on ARM (e.g. DGX Spark), | ||
| # matching Anaconda's naming convention exactly. | ||
| ARG MINICONDA_VERSION=latest | ||
| RUN ARCH="$(uname -m)" && \ | ||
| curl -fsSL "https://repo.anaconda.com/miniconda/Miniconda3-${MINICONDA_VERSION}-Linux-${ARCH}.sh" \ | ||
| -o /tmp/miniconda.sh && \ | ||
| bash /tmp/miniconda.sh -b -p /opt/miniconda3 && \ | ||
| rm /tmp/miniconda.sh | ||
|
|
||
| ENV PATH="/opt/miniconda3/bin:${PATH}" | ||
| ENV CONDA_AUTO_ACTIVATE_BASE=false | ||
|
|
||
| # Accept Anaconda's Terms of Service for the default channels so that | ||
| # non-interactive `conda env create` calls inside tests don't hit | ||
| # CondaToSNonInteractiveError (added in conda ≥ 24.9). | ||
| RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \ | ||
| conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r | ||
|
|
||
| # Initialize conda for bash so `conda run` and activation hooks work in subprocesses | ||
| RUN conda init bash && \ | ||
| conda config --set always_yes true && \ | ||
| conda clean --all --yes | ||
|
|
||
| # Use the system Python (where pytest is installed by Dockerfile.installci) rather | ||
| # than conda's Python, which does not have pytest. Conda's bin is on PATH for the | ||
| # tests themselves (which run `conda run …` / `conda activate …` in subprocesses). | ||
| ENTRYPOINT ["/usr/bin/python", "-m", "pytest", "-c", "source/isaaclab/test/install_ci/pytest.ini", "source/isaaclab/test/install_ci"] | ||
| CMD ["-v", "--tb=short", "-m", "conda"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Added | ||
| ^^^^^ | ||
|
|
||
| * Added installation workflow tests for training smoke coverage across uv, | ||
| conda, kitless, pip, and source-based Isaac Sim installs. | ||
| * Added environment variable controls for Isaac Sim pip installation to support | ||
| version, extras, pre-release, and extra index URL overrides. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Changed | ||
| ^^^^^^^ | ||
|
|
||
| * Updated the ``usd-core`` dependency to 25.11.0 to match Kit 110.1.1. |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -282,12 +282,54 @@ def _ensure_cuda_torch() -> None: | |||||||||||
| ISAACSIM_EXTRAS = "all" | ||||||||||||
| NVIDIA_INDEX_URL = "https://pypi.nvidia.com" | ||||||||||||
|
|
||||||||||||
| # Internal NVIDIA PyPI registries used for pre-release / internal builds. | ||||||||||||
| # Activated when ISAACSIM_EXTRA_INDEX_URLS is set in the environment. | ||||||||||||
| _INTERNAL_ISAACSIM_INDEX_URLS = [ | ||||||||||||
| "https://urm.nvidia.com/artifactory/api/pypi/sw-isaacsim-pypi/simple", | ||||||||||||
| "https://urm.nvidia.com/artifactory/api/pypi/ct-omniverse-pypi/simple", | ||||||||||||
| ] | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| def _install_isaacsim() -> None: | ||||||||||||
| """Install Isaac Sim pip package if not already present.""" | ||||||||||||
| """Install Isaac Sim pip package if not already present. | ||||||||||||
|
|
||||||||||||
| The following environment variables override defaults and enable installation | ||||||||||||
| from internal NVIDIA registries (e.g. for pre-release builds not yet on | ||||||||||||
| ``pypi.nvidia.com``): | ||||||||||||
|
|
||||||||||||
| ``ISAACSIM_VERSION_SPEC`` | ||||||||||||
| pip version specifier, e.g. ``"==6.4.0"`` (default: ``">=6.0.0"``). | ||||||||||||
| ``ISAACSIM_EXTRAS`` | ||||||||||||
| pip extras string, e.g. ``"all,extscache"`` (default: ``"all"``). | ||||||||||||
| ``ISAACSIM_EXTRA_INDEX_URLS`` | ||||||||||||
| Whitespace-separated ``--extra-index-url`` values appended after the | ||||||||||||
| default NVIDIA public index. The two internal NVIDIA Artifactory | ||||||||||||
| registries (``sw-isaacsim-pypi`` and ``ct-omniverse-pypi``) are added | ||||||||||||
| **automatically** whenever this variable is non-empty so callers only | ||||||||||||
| need to supply any additional custom URLs beyond those two. | ||||||||||||
| ``ISAACSIM_USE_PRE`` | ||||||||||||
| Set to ``"1"`` (or ``"true"`` / ``"yes"``) to pass ``--pre`` to pip, | ||||||||||||
| which is required for pre-release wheel versions. | ||||||||||||
| """ | ||||||||||||
| python_exe = extract_python_exe() | ||||||||||||
| pip_cmd = get_pip_command(python_exe) | ||||||||||||
|
|
||||||||||||
| # Resolve settings — env vars win over module-level defaults. | ||||||||||||
| version_spec = os.environ.get("ISAACSIM_VERSION_SPEC", ISAACSIM_VERSION_SPEC) | ||||||||||||
| extras = os.environ.get("ISAACSIM_EXTRAS", ISAACSIM_EXTRAS) | ||||||||||||
| use_pre = os.environ.get("ISAACSIM_USE_PRE", "").strip().lower() in ("1", "true", "yes") | ||||||||||||
|
|
||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 Suggestion: Practically this doesn't matter (pip resolves across all indexes regardless of
Suggested change
|
||||||||||||
| # Build the extra-index-url list. Always start with the public NVIDIA index. | ||||||||||||
| extra_index_urls: list[str] = [NVIDIA_INDEX_URL] | ||||||||||||
| extra_urls_env = os.environ.get("ISAACSIM_EXTRA_INDEX_URLS", "").split() | ||||||||||||
| if extra_urls_env: | ||||||||||||
| # Prepend the two internal registries so they are tried before pypi.org. | ||||||||||||
| prepend_urls = [url for url in _INTERNAL_ISAACSIM_INDEX_URLS if url not in extra_index_urls] | ||||||||||||
| extra_index_urls = prepend_urls + extra_index_urls | ||||||||||||
| for url in extra_urls_env: | ||||||||||||
| if url not in extra_index_urls: | ||||||||||||
| extra_index_urls.append(url) | ||||||||||||
|
|
||||||||||||
| # Check if already installed. | ||||||||||||
| result = run_command( | ||||||||||||
| [python_exe, "-c", "from importlib.metadata import version; print(version('isaacsim'))"], | ||||||||||||
|
|
@@ -302,22 +344,15 @@ def _install_isaacsim() -> None: | |||||||||||
|
|
||||||||||||
| print_info("Installing Isaac Sim...") | ||||||||||||
| using_uv = pip_cmd[0] == "uv" | ||||||||||||
| extra_flags = [] | ||||||||||||
| if using_uv: | ||||||||||||
| # uv needs unsafe-best-match to resolve packages across multiple indexes | ||||||||||||
| # (isaacsim is on pypi.nvidia.com, its deps are on pypi.org). | ||||||||||||
| extra_flags = ["--index-strategy", "unsafe-best-match"] | ||||||||||||
|
|
||||||||||||
| run_command( | ||||||||||||
| pip_cmd | ||||||||||||
| + [ | ||||||||||||
| "install", | ||||||||||||
| f"isaacsim[{ISAACSIM_EXTRAS}]{ISAACSIM_VERSION_SPEC}", | ||||||||||||
| "--extra-index-url", | ||||||||||||
| NVIDIA_INDEX_URL, | ||||||||||||
| ] | ||||||||||||
| + extra_flags | ||||||||||||
| ) | ||||||||||||
| pre_flags = ["--pre"] if use_pre else [] | ||||||||||||
| uv_flags = ["--index-strategy", "unsafe-best-match"] if using_uv else [] | ||||||||||||
|
|
||||||||||||
| extra_idx_args: list[str] = [] | ||||||||||||
| for url in extra_index_urls: | ||||||||||||
| extra_idx_args += ["--extra-index-url", url] | ||||||||||||
|
|
||||||||||||
| run_command(pip_cmd + ["install"] + pre_flags + [f"isaacsim[{extras}]{version_spec}"] + extra_idx_args + uv_flags) | ||||||||||||
|
|
||||||||||||
|
|
||||||||||||
| # Valid Isaac Lab submodule names that can be passed to --install. | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both
install-testsandinstall-tests-condaare set totimeout-minutes: 120. For the conda job,run_install_ci.pysets an inner Docker run timeout of7200 s(exactly 120 minutes). Every second spent onactions/checkout, building the uv base image, and then building the conda image on top of it eats into that same 120-minute budget — meaning the actual Docker run will be cancelled by GitHub Actions before the inner timeout ever fires. In practice even a fast build (~5–10 minutes) leaves the Docker run with only ~110 minutes instead of 120, and the GitHub job is the one that kills the container without a clean JUnit report. Consider raising this to at leasttimeout-minutes: 150(or 160) to provide a genuine buffer for build overhead.