Skip to main content

Installation

Requirements​

RequirementVersion
Python3.10 to 3.14
Nornir3.7.0b1 exactly
Ray2.60.1 or later, below 3

pip installs Nornir and Ray with the package.

Install the package​

Install nornir-ray from a checkout of the repository:

git clone https://github.com/nornir-automation/nornir-ray
cd nornir-ray
pip install .

Install the same packages on every machine that runs workers​

Workers import your task functions from the Python packages installed on their own machine. The runner does not send packages to the workers.

Every machine that runs workers needs the same Python packages as the machine that runs your script:

  • nornir-ray;
  • the connection plugins your tasks use, for example a Netmiko or Scrapli plugin;
  • the packages that define your tasks.

Functions that you define in the script itself, or in a notebook, are the exception: the runner sends them with the task.

On one machine, the workers use the same Python environment as your script, so you have nothing more to install.

If you start scripts with uv run​

When nornir_ray is imported, it sets the environment variable RAY_ENABLE_UV_RUN_RUNTIME_ENV to 0, unless you already set the variable. With this value, the workers use the Python environment of your script. Without it, Ray builds a separate uv environment for each worker.

Ray reads this variable only when ray is first imported. If your script imports ray before nornir_ray, set the variable yourself before you start the script:

RAY_ENABLE_UV_RUN_RUNTIME_ENV=0 uv run python my_script.py

Next step​

Run your first task in the quickstart.