software-list
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software-list [2023/04/05 09:38] – joebathelt | software-list [2023/04/21 09:45] (current) – jonas | ||
---|---|---|---|
Line 17: | Line 17: | ||
===== Containerised environments ===== | ===== Containerised environments ===== | ||
+ | |||
+ | [Contributed by Joe Bathelt] | ||
Let's dive into the fascinating world of containers! Are you tired of dealing with version conflicts and complicated installations of different software packages on your high-performance computer cluster (HPC)? Say no more! Containers provide an easy and self-contained environment for your analysis. They allow you to use any software without the need for systems administrators to install it on the HPC. With containers, you can run complex data analyses on large datasets that would take weeks on a desktop computer, in just a matter of hours! | Let's dive into the fascinating world of containers! Are you tired of dealing with version conflicts and complicated installations of different software packages on your high-performance computer cluster (HPC)? Say no more! Containers provide an easy and self-contained environment for your analysis. They allow you to use any software without the need for systems administrators to install it on the HPC. With containers, you can run complex data analyses on large datasets that would take weeks on a desktop computer, in just a matter of hours! | ||
Line 24: | Line 26: | ||
You might have heard of Docker, which is a popular container environment software that is easy to install and widely used in software development and science. But have you heard of Singularity? | You might have heard of Docker, which is a popular container environment software that is easy to install and widely used in software development and science. But have you heard of Singularity? | ||
- | If you're not sure which container to use for your analysis, don't worry! There are already many fully developed and tested pipelines available, such as // | + | If you're not sure which container to use for your analysis, don't worry! There are already many fully developed and tested pipelines available, such as // |
Most containerised pipelines were implemented in Docker. To run it on the cluster with Singularity, | Most containerised pipelines were implemented in Docker. To run it on the cluster with Singularity, | ||
- | '' | + | < |
- | docker run --privileged -t --rm -v / | + | docker run --privileged -t --rm \ |
- | '' | + | |
+ | | ||
+ | | ||
+ | </ | ||
Once this is done, copy the resulting container to the cluster using //scp// and run the container on the cluster like this: | Once this is done, copy the resulting container to the cluster using //scp// and run the container on the cluster like this: | ||
- | '' | + | < |
singularity run --cleanenv / | singularity run --cleanenv / | ||
path/ | path/ | ||
Line 39: | Line 44: | ||
participant \ | participant \ | ||
--participant-label label | --participant-label label | ||
- | '' | + | </ |
Check the // | Check the // | ||
+ | ==== Making your own container ==== | ||
- | You want to use your own analysis pipeline, I hear you say. No problem, it's easy with neurodocker! It generates a file containing all the required software information for your container. Once you have your file, you can build your container and transfer it to the cluster to run your analysis. | + | You want to use your own analysis pipeline, I hear you say. No problem, it's easy with neurodocker! It generates a file containing all the required software information for your container. Once you have your file, you can build your container and transfer it to the cluster to run your analysis. |
Generate the " | Generate the " | ||
- | '' | + | < |
neurodocker generate singularity \ | neurodocker generate singularity \ | ||
--pkg-manager yum \ | --pkg-manager yum \ | ||
Line 54: | Line 60: | ||
--afni method=binaries version=latest \ | --afni method=binaries version=latest \ | ||
> afni-binaries.Singularityfile | > afni-binaries.Singularityfile | ||
- | '' | + | </ |
Line 61: | Line 67: | ||
- | '' | + | < |
sudo singularity build afni.simg afni-binaries.Singularityfile | sudo singularity build afni.simg afni-binaries.Singularityfile | ||
- | '' | + | </ |
+ | Please note that you need admin rights to build the container. This cannot be done by regular users on the HPC; please contact Steve Hammett or Jonas Larsson for assistance. If you have a Mac or Windows PC, you can install a virtual machine with Linux and build the container there. Ensure that your local version of Singularity is the same as the one on the cluster, i.e. Version 2.6 | ||
- | Please note that you need admin rights to build the container. This cannot be done by regular users on the HPC. If you have a Mac or Windows PC, you can install a virtual machine with Linux and build the container there. | + | ==== Using your Singularity |
- | **Using your singularity image**: | + | There are different ways to use your singularity container. I divided this by use case here: |
- | There are different ways to use your singularity container. I divided this here by use case: | + | |
Test your image: | Test your image: | ||
- | '' | + | < |
- | - You can run your singularity container interactively. This is similar to running a virtual machine. | + | * You can run your singularity container interactively. This is similar to running a virtual machine. |
- | - This is great when you want to check if everything is working as expected. | + | |
- | - Do not be tempted to make changes in the singularity image. They will not persist. Instead, you should modify the singularity instruction file, i.e. the one generated by neurodocker. | + | |
Run a specific command: | Run a specific command: | ||
- | '' | + | < |
- | - You can execute a specific command within your singularity image. This is like the regular command line for running that command with the added parts for running it via singularity. You can specify inputs and parameters as usual. | + | * You can execute a specific command within your singularity image. This is like the regular command line for running that command with the added parts for running it via Singularity. You can specify inputs and parameters as usual. |
- | - This is useful when you have a singularity image with several commands that you may like to run | + | |
Run a script: | Run a script: | ||
- | '' | + | < |
- | - You can get singularity to automatically execute default command. | + | * You can get singularity to automatically execute |
- | - You need to specific | + | |
- | - This is useful for running a pipeline or series of commands, e.g. the singularity version of fmriprep works like this. | + | |
software-list.1680687484.txt.gz · Last modified: 2023/04/05 09:38 by joebathelt