Install on HPC cluster
HPC cluster often do not have a desktop environment, meaning that you need to install the headless version of SpotMAX.
Since most of the HPC clusters run on some Linux-based OS, we recommend using
conda not only to manage the environments, but also to install the
dependencies.
That means installing all the dependencies first and then install Cell-ACDC and SpotMAX without dependencies.
In the Environments folder, you will find the following files:
conda_env_headless.ymlto install dependencies withconda.requirements_headless.txtto install dependencies withpip. Note thatpipcan also be used within acondaenvironment.
Follow these steps to install SpotMAX headless:
Copy environment file(s)
Copy the files above on a folder on the cluster or download them automatically from the terminal with the following commands:
curl -O https://github.com/ElpadoCan/SpotMAX/blob/main/envs/conda_env_headless.yml curl -O https://github.com/ElpadoCan/SpotMAX/blob/main/envs/requirements_headless.txt
Install the package manager
If
condais not already installed on the cluster, install Miniconda by following this guide Install Miniconda.Pip is installed by installing Python. If Python is not already installed on the cluster, we recommend using pyenv to manage Python installation.
Create environment and install dependencies
Navigate in the terminal to the folder where you downloaded the environment files and run the following command(s):
conda env create -f conda_env_headless.yml
python3 -m venv <path_to_env>\acdc source <path_to_env>\acdc\Scripts\activate python3 -m pip install -r requirements_headless.txt
Install additional dependencies from pip:
Some of SpotMAX dependencies are available only from
pipwhich means you need to install them manually with the following commands:pip install --no-deps "git+https://github.com/SchmollerLab/Cell_ACDC.git" pip install "git+https://github.com/ElpadoCan/pytorch3dunet.git"
Install SpotMAX from pip:
Install SpotMAX with the following command:
pip install "git+https://github.com/ElpadoCan/SpotMAX.git"
Install PyTorch (optional):
To install PyTorch follow this guide Install PyTorch. If you have an NVIDIA GPU and a CUDA-capable system, make sure to install the correct CUDA drivers for your GPU by following this guide Install CUDA drivers.
If you are using a cloud computing cluster with Ubuntu (e.g., on de.NBI cloud) and you need to setup PyTorch with NVIDIA GPU see this guide Install PyTorch with GPU support (Linux)
Note
PyTorch is needed only if you plan to use the SpotMAX AI method for spot segmentation. See the parameter
Spots segmentation methodfor more details.Download SpotMAX AI model weights (optional):
Download the model weights from here 3D model and here 2D model to these paths:
~/spotmax_appdata/unet_checkpoints/unet2D/unet_best.pth ~/spotmax_appdata/unet_checkpoints/unet3D/normal_30_250_250_20_100_100/best_checkpoint.pytorch
Alternatively, you can download them automatically with the following commands:
curl --create-dirs -o ~/spotmax_appdata/unet_checkpoints/unet2D/unet_best.pth https://hmgubox2.helmholtz-muenchen.de/index.php/s/4dxeHSLDfAbC8dA/download/unet_best.pth curl --create-dirs -o ~/spotmax_appdata/unet_checkpoints/unet3D/normal_30_250_250_20_100_100/best_checkpoint.pytorch https://hmgubox2.helmholtz-muenchen.de/index.php/s/eoeFcgsAMDsgTgw/download/best_checkpoint.pytorch
Optional: install Numba
SpotMAX can take advantage of multiple CPU cores using the package numba.
For more details, see the Numba documentation.
This typically increases execution speed. After installing SpotMAX, consider
installing numba with the following command:
conda install numba
pip install numba
Note
You can set the number of CPU cores used by numba in the INI
configuration file using the Number of threads used by numba
parameter as follows:
Note
If any of the packages’ installation fails, it is worth trying installing that
package with pip (or with conda if it fails with pip). In this
case you will have to install the packages manually one by one. However,
this strategy should be used as a very last resort.