Try   HackMD

omnipose on Rackham/Pelle

https://github.com/kevinjohncutler/omnipose

There are several dependencies that are difficult to provide on some of the systems unless installed with root. Rackham runs discontinued CentoOS 7 (until replaced by Pelle) and has libc version 2.27 which is too old to be supported by new software. Pelle will run Rocky 9 which currently have libc version 2.35.

Common way to "shift" this problem is to run a container which can provide the necessary libraries and dependencies.

Installing omnipose

The tool requires a lot of dependencies and the project is "poisoned" by braking dependencies. On 2025.01.29 the following is installing successfully on Linux amd64 platform regardless of the distribution.
https://hackmd.io/@pmitev/conda_on_Rackham

mamba create -n omnipose 'python==3.10.12' pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia
conda activate omnipose
python -m pip install git+https://github.com/kevinjohncutler/omnipose.git

Installing the python GUI dependencies

From within the omnipose conda environment, start omnipose and install the PyQt6 as suggested. The installation will proceed and will fail to run the tool, because of the old libc and/or missing libraries. Despite that, the installation is successful.

Runningomnipose within a Singularity/Apptainer container.

Container with Ubuntu 24.04 with necessary libraries and conda from the miniforge3 project is enough to solve the issues mentioned above.

# Get an interactive shell in the container
# --nv is needed if you want to interact with GPUs in the container
singularity shell --nv omnipose-env.sif

# Activate the conda environment
conda activate /full/path_to_your/conda_enviroment

# Start the tool 
omnipose

Rackham's file system is slow, it takes quite some time to get the window open

image

Running non-interactive using SLURM

#!/bin/bash -l
#SBATCH -A uppmax2021-3-1
#SBATCH --exclusive
#SBATCH -p node
#SBATCH -n 1
#SBATCH -c 16
#SBATCH -M snowy
#SBATCH --gpus=1
#SBATCH -t 00:10:00
#SBATCH -J CB5665
#SBATCH -q gpu

singularity exec --nv omnipose-env.sif \
  /crex/proj/full_path/omnipose/bin/python3 SegmentCells.py
  
# or with conda explicitly activated
# singularity exec --nv omnipose-env.sif /bin/bash -c "source /.singularity_bash; conda activate omnipose; python3 SegmentCells.py"
  

Container

To get the building definition, run

singularity inspect -d omnipose-env.sif

https://github.com/pmitev/UPPMAX-Singularity/tree/main/omnipose

Contacts: