Skip to content

rbi-mtm/supek_containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Containers on Supek

It is advised to install Python packages on Supek into containers using Apptainer. The documentation of the process is in Croatian and might be annoying to sift through for beginners. This repository simplifies the process.

Setting Up

Note

You should be connected to the GPU cluster:

ssh username@login-gpu.hpc.srce.hr

Create a directory where you will store your containers:

mkdir -p ~/containers

and put the build_container.sh script into ~/containers.

Append the following lines to ~/.bashrc:

export PATH="/lustre/home/${USER}/containers:$PATH"
export C="/lustre/home/${USER}/containers"
alias activate='singularity shell'

Building Containers

Write a container definition file in ~/containers. E.g., the following example hea.def file installs a Python package from a GitHub repository:

Bootstrap: docker
From: condaforge/miniforge3

%post

  apt update
  apt -y install vim git less

  git clone https://github.com/ovcarj/hea
  cd hea

  conda create -n hea python=3.13
  . /opt/conda/bin/activate
  conda activate hea
  python -m pip install -e .

%environment

  . /opt/conda/bin/activate
  conda activate hea

The %environment section ensures that the Conda environment containing the installed packages is activated whenever the container is activated.

Build the container:

bash build_container.sh hea.sif hea.def

Activate the container:

activate $C/hea.sif

About

Simplified container building on Supek.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages