A simple tutorial for running netZooPy (PANDA / LIONESS) with CuPy GPU acceleration on an HPC cluster (Open OnDemand, SLURM). The demo uses motif and PPI priors downloaded from GRAND; we also document sponge so you can use motif and PPI priors from sponge instead. Notebooks are compute-only; installs happen outside Jupyter.
This tutorial is an update of the netZooPy gpuPanda tutorial (Daniel Morgan, Channing Division of Network Medicine, Brigham and Women's Hospital / Harvard Medical School).
- Open OnDemand Jupyter app
- SLURM GPU partition
- NVIDIA GPU nodes (CUDA 12–compatible, e.g. A100)
- NVIDIA driver ≥ CUDA 12
- CUDA runtime provided via modules (no CUDA in conda; will set it up for this later)
- User Miniforge install
Assumed:
cupy-cuda12x- CUDA module close to
CUDA/12.3.0
Use config/netzoo-gpu.yml or the block below:
name: netzoo-gpu
channels:
- conda-forge
dependencies:
- python=3.10
- pip
- numpy<1.24
- pandas
- psutil
- s3fs
- ipykernel
- pip:
- cupy-cuda12xNotes: CuPy via pip to match system CUDA; CUDA from modules, not conda. NumPy pinned for netZooPy.
On a hpc, load Miniforge and create/activate the environment, then register the Jupyter kernel.
module load miniforge/condaconda env create -f config/netzoo-gpu.ymlconda activate netzoo-gpupython -m ipykernel install --user \
--name netzoo-gpu \
--display-name "Python (netzoo-gpu)"Install netZooPy into the netzoo-gpu environment from a user-writable
source directory.
mkdir -p $HOME/src
cd $HOME/srcgit clone --branch devel https://github.com/netZoo/netZooPy.git
cd netZooPy
pip install -e .You can use sponge to obtain motif and PPI priors instead of the GRAND
downloads in the demo. For setup, see using sponge and config/sponge.yml.
-
Start Jupyter on a GPU node (Open OnDemand)
Load CUDA before starting the Jupyter server.module load CUDA/12.3.0
Select kernel:
Python (netzoo-gpu). -
Run the demo
Open panda-gpu-demo.ipynb. It downloads LCL motif and PPI data from GRAND intodata/, runs PANDA with GPU and precision options, and writes results tooutput/. To use motif and PPI priors from sponge instead, see Using sponge.
import sys
sys.executableExpected:
.../miniforge3/envs/netzoo-gpu/bin/python
import cupy as cp
cp.cuda.runtime.getDeviceCount()If this fails:
- Confirm a GPU was requested in Open OnDemand
- Confirm
CUDA/12.3.0was loaded before Jupyter launch - Restart the Jupyter server after module changes
panda-gpu-tutorial/
├── config/ # Environment configs (conda, sponge)
│ ├── netzoo-gpu.yml
│ └── sponge.yml
├── data/ # Input data (e.g. from GRAND; see data/README.md)
├── docs/ # Project documentation (e.g. using-sponge.md)
├── output/ # PANDA and other pipeline outputs
├── src/ # Scripts (e.g. sponge.sh)
├── tests/ # Tests
├── panda-gpu-demo.ipynb
├── README.md
├── requirements.lock.txt
├── CONTRIBUTING.md
├── LICENSE
├── .github/
│ ├── ISSUE_TEMPLATE/
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
└── .gitignore
We welcome contributions. See CONTRIBUTING.md for guidelines.
View the LICENSE for this project.
- Shaurita Hutchins email | PhD Candidate| sdhutchins
- netZooPy (PANDA, GPU): The Network Zoo: a multilingual package for the inference and analysis of gene regulatory networks. NAR Genomics and Bioinformatics 4(1), lqac002 (2022).
- sponge: sponge: reproducible Python environments for HPC. Bioinformatics 41(7), btaf320 (2025).