Below is a no-sudo, Miniforge-based setup that works cleanly on the Wahab cluster at ODU. This assumes a typical HPC environment (login node + compute nodes, shared home filesystem).
1. Choose an install location (home directory)
Use a path under your home directory so no admin privileges are needed:
cd ~
mkdir -p software
cd software2. Download Miniforge (Linux, x86_64)
Wahab nodes are Linux-based. Use Miniforge3:
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.shIf wget is unavailable, use:
curl -LO https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh3. Install Miniforge (no sudo)
Run the installer and point it to your home directory:
bash Miniforge3-Linux-x86_64.shWhen prompted:
-
Install location → something like
/home/<your_username>/software/miniforge3-
-
Initialize Miniforge → yes
If you prefer not to auto-modify shell files, answer no and do it manually (shown below).
4. Initialize Conda manually (recommended on HPC)
If you answered no to auto-init, add this to your ~/.bashrc (or ~/.bash_profile depending on Wahab):
# Miniforge
export PATH="$HOME/software/miniforge3/bin:$PATH"Then reload:
source ~/.bashrcVerify:
conda --version5. Configure Conda for HPC use (important)
Disable auto-activation of base and use conda-forge only:
conda config --set auto_activate_base false
conda config --add channels conda-forge
conda config --set channel_priority strict6. Create a virtual environment
Example for Python 3.10:
conda create -n hqin_env python=3.10Activate:
conda activate hqin_envConfirm:
which python
python --version7. Install packages (safe for no-sudo)
Examples:
conda install numpy scipy pandas scikit-learn matplotlib
conda install pytorch torchvision torchaudio cpuonlyIf Wahab has GPUs and CUDA modules:
conda install pytorch torchvision torchaudio pytorch-cuda=11.8(Load the CUDA module first if Wahab uses environment modules.)
8. Using Miniforge inside Slurm jobs
In your Slurm script, always initialize Conda explicitly:
#!/bin/bash
#SBATCH --job-name=hqin_test
#SBATCH --time=01:00:00
#SBATCH --mem=16G
source $HOME/software/miniforge3/etc/profile.d/conda.sh
conda activate hqin_env
python your_script.pyThis avoids common “conda not found” errors on compute nodes.
9. Optional: faster environments with mamba
Miniforge includes mamba:
mamba create -n hqin_env2 python=3.11 numpy pandasMuch faster than conda on shared filesystems.
10. Common Wahab-specific tips
-
Never install under /usr, /opt, or /shared unless explicitly allowed.
-
Keep environments small; many tiny envs > one giant env.
-
If storage quotas are tight:
conda clean --all-
-
If Wahab uses Lmod:
module purge-
before activating conda to avoid library conflicts.
If you want, I can:
-
Tailor this to GPU partitions on Wahab
-
Provide a ready-to-use Slurm template for your AI / genomics workflows
-
Help you mirror this setup on AWS / ODU GPU clusters for consistency
No comments:
Post a Comment