InstallationΒΆ

Clustrix can be installed using pip or conda, with optional dependencies for specific cluster types.

Basic InstallationΒΆ

Install Clustrix using pip:

pip install clustrix

Development InstallationΒΆ

For development or to get the latest features:

git clone https://github.com/ContextLab/clustrix.git
cd clustrix
pip install -e ".[dev]"

Optional DependenciesΒΆ

Jupyter Notebook SupportΒΆ

For Jupyter notebook integration with interactive widgets:

pip install clustrix[notebook]
# or
pip install clustrix ipywidgets pyyaml

This enables the %%clusterfy magic command for interactive configuration.

Kubernetes SupportΒΆ

For Kubernetes cluster support:

pip install clustrix[kubernetes]
# or
pip install clustrix kubernetes

Documentation and TutorialsΒΆ

To build documentation locally:

pip install clustrix[docs]
cd docs
make html

All Optional DependenciesΒΆ

Install everything:

pip install clustrix[all]

RequirementsΒΆ

  • Python 3.8 or higher

  • SSH access to target clusters (for remote execution)

  • Appropriate cluster scheduler tools (SLURM, PBS, SGE) on target systems

VerificationΒΆ

Verify your installation:

import clustrix
print(clustrix.__version__)

# Test local execution
from clustrix import cluster, configure

configure(cluster_host=None)  # Local execution

@cluster(cores=2)
def test_function():
    return "Clustrix is working!"

result = test_function()
print(result)  # Should print: "Clustrix is working!"

Verify Jupyter IntegrationΒΆ

If you installed notebook support, test the magic command in Jupyter:

import clustrix
# Magic command should be auto-registered

# In a Jupyter cell:
%%clusterfy
# Interactive widget should appear