Skip to content

Instantly share code, notes, and snippets.

@Kumquatum
Last active June 7, 2023 15:52
Show Gist options
  • Save Kumquatum/c25c279391426c4858f0de9c44de6280 to your computer and use it in GitHub Desktop.
Save Kumquatum/c25c279391426c4858f0de9c44de6280 to your computer and use it in GitHub Desktop.

(French below)

Singularity rootless install

Not having the administrator rights, it is necessary to install most of the software locally and to think of putting the path redirections towards these installations.
Ideally create a folder on your home to put all the software. Example:

mkdir ~/bin  

GO (required for singularity)

  • Go to the software folder without creating a folder, uncompressing will give one
cd /cluster/CBIO/home/glemoine/bin  
  • Download go and uncompress it
wget https://go.dev/dl/go1.18.2.linux-amd64.tar.gz  
tar xzf go1.18.2.linux-amd64.tar.gz  
  • Export the path of the created executable in the $PATH system variable to make go executable. Ideally add them to ~/.bashrc so you don't have to do it every time you connect to the server
export PATH=${PATH}:/cluster/CBIO/home/glemoine/bin/go/bin  
  • Test the installation
go version  

Squashfs-tools (required for Singularity)

More specifically, it is necessary to build and pull Docker images

  • Installation:
  • download squashfs-tools via the github repo
  • change the name of the folder because it is a folder containing the sources but not the future compiled squashfs-tools
  • create a new folder named squashfs-tools_builder where squashfs-tools will be compiled
  • go to the build folder
  • change the installation path in the Makefile to the local installation folder
  • install
git clone git@github.com:plougher/squashfs-tools.git  
mv squashfs-tools squashfs-tools_builder  
mkdir squashfs-tools  
cd squashfs-tools_builder/squashfs-tools  
vim Makefile  
make install  
  • Change to be made in the `Makefile
# INSTALL_PREFIX = /usr/local  
INSTALL_PREFIX = /cluster/CBIO/home/glemoine/bin/squashfs-tools  
  • Export the path of the created executable in the $PATH system variable to make it executable. Ideally add them to ~/.bashrc so that you don't have to do it every time you connect to the server
export PATH=$PATH:/cluster/CBIO/home/glemoine/bin/squashfs-tools/bin  

Singularity

  • Go to the software folder without creating a folder, the github repo clone will give one
cd /cluster/CBIO/home/glemoine/bin  
  • Installation:
  • download singularity via the github repo
  • change the name of the folder because it is a folder containing the sources but not the future compiled singularity
  • create a new folder named singularity where singularity will be compiled
  • go to the build folder
  • choose the version to consider
  • configure by excluding seccomp and conmon because these are not libs present on our cluster (but maybe they are on yours), and by specifying with --without-suid that you don't have sudo privileges
  • compile then install
git clone https://github.com/sylabs/singularity.git  
mv singularity singularity_builder  
mkdir singularity  
cd singularity_builder/  
git checkout v3.10.0  
./mconfig --without-seccomp --without-conmon --without-suid --prefix=/cluster/CBIO/home/glemoine/bin/singularity  
make -C builddir  
make -C builddir install  
  • Export the path of the created executable to the $PATH system variable to make it executable. Ideally add them to ~/.bashrc so you don't have to do it every time you connect to the server
export PATH=$PATH:/cluster/CBIO/home/glemoine/bin/singularity/bin  
  • Test the installation
singularity version  

Installation de Singularity sans droits admin

N'ayant pas les droits administrateur, il faut s'installer la plupart des logiciels en local et penser à mettre les redirections de chemin vers ces installations.
Idéalement créer un dossier sur son home pour mettre tous les logiciels. Exemple :

mkdir ~/bin  

GO (nécessaire pour singularity)

  • Se rendre dans le dossier de logiciel sans créer de dossier, le désarchivage en donnera un
cd /cluster/CBIO/home/glemoine/bin  
  • Télécharger go et désarchiver
wget https://go.dev/dl/go1.18.2.linux-amd64.tar.gz  
tar xzf go1.18.2.linux-amd64.tar.gz  
  • Exporter le chemin de l'executable créé dans la variable système $PATH pour rendre go exécutable. Idéalement les rajouter dans ~/.bashrc pour ne pas avoir à le faire à chaque connexion au serveur
export PATH=${PATH}:/cluster/CBIO/home/glemoine/bin/go/bin  
  • Tester l'installation
go version  

Squashfs-tools (nécessaire pour Singularity)

Plus particulièrement, c'est nécessaire pour build et pull les images Docker

  • Installation :
  • télécharger squashfs-tools via le repo github
  • changer le nom du dossier car c'est un dossier contenant les sources mais pas le futur squashfs-tools compilé
  • créer un nouveau dossier nommé squashfs-tools_builder où sera mis squashfs-tools compilé
  • se rendre dans le dossier de build
  • changer le chemin d'installation dans le Makefile pour le dossier d'installation locale
  • installer
git clone git@github.com:plougher/squashfs-tools.git  
mv squashfs-tools squashfs-tools_builder  
mkdir squashfs-tools  
cd squashfs-tools_builder/squashfs-tools  
vim Makefile  
make install  
  • Modification à faire dans le Makefile
# INSTALL_PREFIX = /usr/local  
INSTALL_PREFIX = /cluster/CBIO/home/glemoine/bin/squashfs-tools  
  • Exporter le chemin de l'executable créé dans la variable système $PATH pour rendre go exécutable. Idéalement les rajouter dans ~/.bashrc pour ne pas avoir à le faire à chaque connexion au serveur
export PATH=$PATH:/cluster/CBIO/home/glemoine/bin/squashfs-tools/bin  

Singularity

  • Se rendre dans le dossier de logiciel sans créer de dossier, le clone du repo github en donnera un
cd /cluster/CBIO/home/glemoine/bin  
  • Installation :
  • télécharger singularity via le repo github
  • changer le nom du dossier car c'est un dossier contenant les sources mais pas le futur singularity compilé
  • créer un nouveau dossier nommé singularity où sera mis singularity compilé
  • se rendre dans le dossier de build
  • choisir la version à considérer
  • configuer en excluantseccomp et conmon car ne sont pas des lib présentes sur le cluster, et en précisant avec --without-suid qu'on ne dispose pas des privilèges sudo
  • compiler puis installer
git clone https://github.com/sylabs/singularity.git  
mv singularity singularity_builder  
mkdir singularity  
cd singularity_builder/  
git checkout v3.10.0  
./mconfig --without-seccomp --without-conmon --without-suid --prefix=/cluster/CBIO/home/glemoine/bin/singularity  
make -C builddir  
make -C builddir install  
  • Exporter le chemin de l'executable créé dans la variable système $PATH pour rendre go exécutable. Idéalement les rajouter dans ~/.bashrc pour ne pas avoir à le faire à chaque connexion au serveur
export PATH=$PATH:/cluster/CBIO/home/glemoine/bin/singularity/bin  
  • Tester l'installation
singularity version  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment