Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| anaconda_sing [2023/12/07 19:05] – admin | anaconda_sing [2023/12/08 08:29] (Version actuelle) – [Motivation] admin | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| ===== Motivation ===== | ===== Motivation ===== | ||
| - | Because lumière cluster is based on an old operating system (Centos 6.10), GLIBC errors may occur when installing or using conda packages. | + | Because lumière cluster is based on an old operating system ('' |
| - | The idea is to use a more recent version of GLIBC embedded in a singularity container. | ||
| - | **advantage: | + | < |
| + | ./python3: / | ||
| + | ./python3: / | ||
| + | ./python3: / | ||
| + | </ | ||
| + | ---- | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | __**Solution: | ||
| + | |||
| + | <color #22b14c>**advantage: | ||
| - | <color #ed1c24>disadvantage: | + | **disadvantage: |
| - | ===== How to use Singularity ? ===== | + | ===== How to use |
| We have created a wrapper around conda called **conda_sing**.\\ | We have created a wrapper around conda called **conda_sing**.\\ | ||
| Ligne 21: | Ligne 33: | ||
| $ module load miniconda/ | $ module load miniconda/ | ||
| </ | </ | ||
| - | + | ||
| - | === Create new environment === | + | <note important> |
| + | Since '' | ||
| + | <code bash> | ||
| + | $ module load miniconda/ | ||
| + | $ meso_setup_conda | ||
| + | </ | ||
| + | </ | ||
| + | ==== Create new environment ==== | ||
| + | |||
| + | Create a new environment called '' | ||
| <code bash> | <code bash> | ||
| Ligne 28: | Ligne 49: | ||
| </ | </ | ||
| - | Replace'' | ||
| - | === Install new packages in the environment === | + | To list conda environments |
| + | <code bash> | ||
| + | $ conda_sing env list | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Install new packages in the environment | ||
| <note warning> | <note warning> | ||
| Traditionally, | Traditionally, | ||
| Ligne 41: | Ligne 68: | ||
| </ | </ | ||
| - | === Run program in the environment === | + | |
| + | To list installed packages: | ||
| + | <code bash> | ||
| + | $ conda_sing list -n myEnv | ||
| + | </ | ||
| + | ==== Run program in the environment | ||
| To run program using Singularity : | To run program using Singularity : | ||
| Ligne 48: | Ligne 80: | ||
| </ | </ | ||
| + | |||
| + | ==== SGE script ==== | ||
| + | |||
| + | <file bash anaconda.sge> | ||
| + | |||
| + | #!/bin/bash | ||
| + | |||
| + | #$ -q all.q | ||
| + | |||
| + | #$ -l h_vmem=6G ## job will cancel if memory exceed | ||
| + | |||
| + | #$ -N Test_anaconda | ||
| + | |||
| + | module load miniconda/ | ||
| + | |||
| + | conda_sing run -n myEnv python myProgram.py | ||
| - | === SGE script === | + | </ |