Installing Applications

On GridUnesp, you do not have administrator (root) privileges. This means you cannot install programs in the system’s default directories (/usr/, /lib/). However, there are several ways to install and use scientific applications in your own space.

Installation Options

  1. Use already-installed modules (recommended)

  2. Install locally in your /home/

  3. Use Conda to manage environments

  4. Use containers (Apptainer)

  5. Request a global installation from the team

Installation via Modules (Already Installed)

GridUnesp has dozens of pre-installed applications available as modules.

Listing Available Modules

module avail

To search for a specific module:

module avail partial_name

Loading a Module

module load module_name/version

Example:

module load gcc/10.2.0
module load openmpi/4.1.5

Checking Loaded Modules

module list

Unloading a Module

module unload module_name

Tip

For more details on modules, see the Requesting a Global Installation section.

Local Installation in /home/

Many applications allow specifying an alternative installation directory.

Using –prefix (configure/make)

Example of local installation
# Download and extraction
wget https://example.com/application.tar.gz
tar -xzf application.tar.gz
cd application

# Configure to install in /home/$USER/local
./configure --prefix=/home/$USER/local
make
make install

# Add to PATH
export PATH=/home/$USER/local/bin:$PATH
export LD_LIBRARY_PATH=/home/$USER/local/lib:$LD_LIBRARY_PATH

To make the installation permanent, add the PATH and LD_LIBRARY_PATH lines to your ~/.bashrc.

Installation via Conda

Conda is a package manager that allows you to create isolated environments.

Creating an Environment

# Load the Conda module
module load miniconda/24.4.0-libmamba

# Create environment
conda create -n my_environment python=3.9

# Activate environment
source activate my_environment

Installing Packages

conda install numpy pandas matplotlib
conda install -c bioconda samtools  # Specific channel

Listing Environments and Packages

conda info --envs          # List environments
conda list                 # List packages in current environment
conda deactivate           # Exit the environment

Using in Submission Scripts

conda_script.sh
#!/bin/bash
#SBATCH -J my_job
#SBATCH -n 1
#SBATCH -t 01:00:00

export INPUT="input.dat"
export OUTPUT="output.dat"

module load miniconda/24.4.0-libmamba
source activate my_environment

job-nanny python my_script.py

Installation via Apptainer (Containers)

Apptainer allows running applications in containers, useful when:

  • The application depends on specific libraries from another Linux distribution

  • You need a reproducible environment

  • Conventional installation is too complex

Creating an Image

build_container_script.sh
#!/bin/bash
#SBATCH -J build_container
#SBATCH -t 02:00:00
#SBATCH -n 1

export INPUT="ubuntu.def"
export OUTPUT="ubuntu.sif"

job-nanny apptainer build ubuntu.sif ubuntu.def

Definition file (ubuntu.def):

Bootstrap: docker
From: ubuntu:20.04

%post
    apt-get update
    apt-get install -y python3 python3-pip
    pip3 install numpy pandas

%runscript
    python3 "$@"

Running a Container

run_container_script.sh
#!/bin/bash
#SBATCH -J run_container
#SBATCH -t 01:00:00
#SBATCH -n 1

export INPUT="ubuntu.sif script.py data/"
export OUTPUT="results/"

job-nanny apptainer exec ubuntu.sif python3 script.py

Tip

See the Containers section for more advanced examples, including MPI and GPU.

Requesting a Global Installation

If the application:

  • Is too complex for local installation

  • Will be useful for several users

  • Requires special system configuration

You can request from the GridUnesp team:

Email: support.ncc@unesp.br

Required information:

  • Application name

  • Desired version

  • Link to official documentation

  • Installation instructions (if available)

Note

The team will evaluate the request and may:

  • Install globally as a module

  • Suggest local installation

  • Provide specific guidance

Command Summary

Commands for module management

Command

Description

module avail

List available modules

module load name

Load module

module list

View loaded modules

module unload name

Unload module

module purge

Unload all

See also