Hoffman2:Singularity: Difference between revisions
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
module load singularity | module load singularity | ||
singularity shell --userns $H2_CONTAINER_LOC/tensorflow-2.4.1-gpu-jupyter.sif | singularity shell --userns $H2_CONTAINER_LOC/tensorflow-2.4.1-gpu-jupyter.sif | ||
Then run your command inside of the container | |||
python3 tf-example.py > tf-example-batch.out | |||
====Batch mode==== | |||
Add the following line into your batch job script | |||
module load singularity/3.7.1 | |||
Use "singularity exec" to run command in Singularity container | |||
Example | |||
singularity exec --userns $H2_CONTAINER_LOC/tensorflow-2.4.1-gpu-jupyter.sif python3 tf-example.py > tf-example-batch.out |
Revision as of 22:33, 12 August 2021
Singularity
Singularity is a type of container technology. It is provided in Hoffman2 currently.
How to use Singularity
Interactive mode
In a CentOs 7 Node, load Singularity module as
module load singularity singularity shell --userns $H2_CONTAINER_LOC/tensorflow-2.4.1-gpu-jupyter.sif
Then run your command inside of the container
python3 tf-example.py > tf-example-batch.out
Batch mode
Add the following line into your batch job script
module load singularity/3.7.1
Use "singularity exec" to run command in Singularity container
Example
singularity exec --userns $H2_CONTAINER_LOC/tensorflow-2.4.1-gpu-jupyter.sif python3 tf-example.py > tf-example-batch.out