Skip to content

Install on HPC (Bruno)

Ziwen Liu edited this page Oct 18, 2024 · 8 revisions

Note

We maintain a shared environment on Bruno. Most users should use it unless additional packages are required.

This guide only applies to Bruno, the Biohub's on-site HPC system.

Make a virtual environment

Virtual environments allows isolation of dependencies across software.

Load the Anaconda module:

# the 2022.05 version has mamba, a faster version of conda
# substitute `mamba` with `conda` if not using this version
module load anaconda/2022.05

Make a new environment in your /hpc/mydata/first.last folder. We recommend using this folder because each user has 1 TB of space. The home directories are small (32GB) and meant to hold only configurations. They are not large enough to hold python environments.

# this command will ask for user confirmation
mamba create -p /hpc/mydata/first.last/envs/ndutils python=3.11

Activate the new environment:

conda activate /hpc/mydata/first.last/envs/ndutils

From now on, all of the commands should be executed in this environment. The name of the current environment should appear in parentheses at the left-most of the console prompt.

Install napari-iohub

The napari-iohub package is a plugin for napari, a multi-dimensional image viewer.

Install napari

Install napari with pip:

# this installs PyQt5 by default
pip install "napari[all]"

And check that napari is installed correctly (a window should pop up):

napari

Refer to napari's documentation for more installation instructions.

Install the plugin

Installing the plugin requires cloning (downloading) the repository. An example cloning command would be:

git clone https://github.com/czbiohub/napari-iohub.git

Then install the downloaded package with pip:

pip install ./napari-iohub

Then launch napari with the plugin's main widget:

napari --with napari-iohub

Install other napari plugins

Napari has a rich plugin ecosystem. Below are some useful plugins for microscopy data.

napari-ome-zarr (no GUI) for opening OME-Zarr datasets via CLI or drag-and-drop:

pip install napari-ome-zarr

napari-animation (has GUI) for making movies:

pip install napari-animation