Skip to main content

A package for ClearMap project

Project description

ClearMap (NMR - G. Fenton customized version)

To learn about ClearMap read the Documentation.

To use ClearMap in SOMA cluster follow these steps:

Setup

1. Clone this repository in soma login nodes (using your soma account):

git clone https://github.com/mpinb/clearmap-nmr.git

2. Change into the cloned repository folder and create the container using the ilastik-nmr definition file (ilastik-nmr.def)

cd ~/clearmap-nmr
module load apptainer
apptainer build ilastik-nmr.sif ilastik-nmr.def

3. Create conda environment using the environment definition file in this repository

module load anaconda3/2022.10
source activate
cd ~/clearmap-nmr
CONDA_OVERRIDE_CUDA="11.8" conda env create -n clearmap-nmr -f clearmap-nmr-env.yml

4. Activate the environment, add scripts that setup the environment variables and create an ipython kernel to use the environment inside Jupyter Notebook.

conda activate clearmap-nmr
cp env_vars.sh $CONDA_PREFIX/etc/conda/activate.d
cp reset_env_vars.sh $CONDA_PREFIX/etc/conda/deactivate.d
python -m ipykernel install --user --name clearmap-nmr --display-name 'clearmap-nmr'

pip install clearmap-nmr (NEW: 26.08.2025)

We now recommend to pip install the package to avoid recompilation of the Cython extensions in soma cluster.

python -m pip install clearmap-nmr

Running clearmap-nmr

Allocate a compute node from soma GPU partition (large memory nodes).

srun -p GPU -t 8:00:00 --mem 720G --cpus-per-task=48 --nodes=1 --pty bash

If there are no GPU nodes available, allocate a node from the CPU partition instead.

srun -p GPU -t 8:00:00 --mem 350G --cpus-per-task=48 --nodes=1 --pty bash

Start a shell using the apptainer container image and then inside the container load anaconda3 and launch jupyter lab

Note: The environment modules script is used to load anaconda.

module load apptainer
apptainer shell --bind /gpfs:/gpfs ilastik-nmr.sif
# another alternative is using the ilastik-nmr.sif image in /gpfs/soma_fs/scratch/containers
# apptainer shell --bind /gpfs:/gpfs /gpfs/soma_fs/scratch/containers/ilastik-nmr.sif
source /gpfs/soma_fs/soft/CentOS_7/packages/x86_64/environment-modules/5.1.1/init/bash
module load anaconda3/2022.10
source activate
conda activate clearmap-nmr

# OPTION 1: Use jupyter-lab 
cd ** CLEARMAP-NMR REPOSITORY CLONE DIRECTORY **
jupyter-lab --port 2020 --no-browser

# OPTION 2: Run a python script
python PYTHON-SCRIPT.py

From your workstation open an ssh-tunnel connection to the compute node where the jupyter server instance is running.

ssh -fN -L 2020:localhost:2020 somacpu0XX

Open your browser and enter the jupyter-lab link from the previous step to start a Jupyter Lab session and run the ClearMap NMR notebooks. Remember to switch the ipython kernel to use the one created above.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clearmap_nmr-0.2.0.tar.gz (563.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clearmap_nmr-0.2.0-cp310-cp310-manylinux_2_39_x86_64.whl (42.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file clearmap_nmr-0.2.0.tar.gz.

File metadata

  • Download URL: clearmap_nmr-0.2.0.tar.gz
  • Upload date:
  • Size: 563.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clearmap_nmr-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cb8104941372042232b92bfd756f60b343e87f3f8087f0457f55f6f63e1109e6
MD5 a798e18c847c035545db95544c548525
BLAKE2b-256 5e41d46423b69c6f3c7101cc624c0d72875cb87d91777271ad3ca34aef7be05e

See more details on using hashes here.

Provenance

The following attestation bundles were made for clearmap_nmr-0.2.0.tar.gz:

Publisher: publish-package.yml on mpinb/clearmap-nmr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file clearmap_nmr-0.2.0-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for clearmap_nmr-0.2.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b1f19e0c3f3fa740744ac338a8f4d69999bba0014d3c2137a134b681c57f740d
MD5 b652ae9715e79cf397897d332cb11bab
BLAKE2b-256 48d507df291089cb7491390ff95e76db30649dbb1d0f8c3c28067770430e42a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for clearmap_nmr-0.2.0-cp310-cp310-manylinux_2_39_x86_64.whl:

Publisher: publish-package.yml on mpinb/clearmap-nmr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page