Table of Contents |
---|
Warning |
---|
The csubmitter tool described below is not working properly; if you need to install your container, please contact rchelp@hms.harvard.edu and provide all relevant information about your container, and we will install it for you. |
...
Containers available from other repositories or webpages must be first downloaded on O2 and then submitted with the --image-path flag.
Note: The testing process can take from several minutes to a few hours, depending on the type of container tested.
...
Code Block |
---|
#!/bin/bash #SBATCH -p short #SBATCH -t 2:00:00 #SBATCH -c 1 #SBATCH --mem=4G singularity exec /n/app/singularity/containers/$USER/your_container.sif tool_to_run |
Note 1:
By default only /tmp and /home/$USER are available inside the singularity container.
...
Code Block |
---|
compute-a-16-21:~ singularity exec -B /n/scratch3scratch,/n/app /n/app/singularity/containers/debian10.sif df -h Filesystem Size Used Avail Use% Mounted on overlay 16M 32K 16M 1% / devtmpfs 126G 0 126G 0% /dev tmpfs 126G 8.0K 126G 1% /dev/shm /dev/mapper/compute--a--17--80-root 20G 4.6G 16G 24% /etc/hosts tmpfs 16M 32K 16M 1% /.singularity.d/actions orchestra2-p10.med.harvard.edu:/ifs/mdcp10/systems/Orchestra/home/$USER 135T 123T 13T 91% /home/$USER /dev/mapper/compute--a--17--80-tmp 302G 33M 302G 1% /tmp /dev/mapper/compute--a--17--80-var 20G 552M 19G 3% /var/tmp vast-cnodedata.vstscrtchmdcp01.med.harvard.edu:/scratch01 scratch 910T 562T 348T 62% /n/scratch3scratch orchestra2-p10.med.harvard.edu:/o2_app 10T 2.2T 7.9T 22% /n/app |
Access permissions for those filesystem is preserved inside the container.
Note 2:
By default not all env variables might be ported inside the singularity container. If a variable defined outside Singularity needs to be ported inside the container and it is not available by default, it can be pre-set outside the container with the prefix SINGULARITYENV_. For example the variable FOO can be ported inside the singularity container by presetting it as SINGULARITYENV_FOO
Code Block |
---|
compute-a-16-21:~ FOO="something" compute-a-16-21:~ export SINGULARITYENV_FOO=$FOO |
Note 3:
If you plan to use one or more GPU cards inside the container you need to submit the O2 job to a partition that supports GPU computing and add the flag --nv
to your singularity command, for example:
singularity exec --nv -B /n/scratch3 scratch /n/app/singularity/containers/$USER/your_container.sif
...