Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

To create containers, we use public.docker.itc.griffith.edu.au
Simple "singularity pull" with s3proxy stopped working for docker hubs around Oct 2020. This is due to the changes (limits) docker introduced. To avoid hitting the limits, Griffith team implemented steps to stop direct access through the s3proxy http proxy to the docker hub registry (see https://www.docker.com/blog/understanding-inner-loop-development-and-pull-rates/ for notes)

...

No Format
To build an image 
singularity pull  docker://public.docker.itc.griffith.edu.au/biocontainers/blast:2.2.31

To run a container
singularity run docker://public.docker.itc.griffith.edu.au/godlovedc/lolcow

# Download the container into a permanent image file
###Old method which will not work anymore ###http_proxy=http://s3proxy.itc.griffith.edu.au:3128  singularity pull my_blast.sif docker://biocontainers/blast:2.2.31 

singularity pull my_blast.sif docker://public.docker.itc.griffith.edu.au/biocontainers/blast:2.2.31

Another example:
singularity pull lolcow_latest.sif docker://public.docker.itc.griffith.edu.au/godlovedc/lolcow

# Now run it from the image file
singularity exec my_blast.sif blastp -version
blastp: 2.2.31+
Package: blast 2.2.31, build Apr 23 2016 15:49:47 Package: blast 2.2.31, build Apr 23 2016 15:49:47
Using GPU(s) with a Container
This is useful on the n060 node with gpu cards

A docker or singularity container built to use an NVIDIA GPU should be run with the--nv option 

singularity pull docker://public.docker.itc.griffith.edu.au/tensorflow/tensorflow:latest-gpu-jupyter

singularity run --nv  tensorflow_latest-gpu-jupyter.sif

(-B /run is needed for some images (using e.g. jupyter, that give an error otherwise. For that, use this syntax:
singularity run --nv –B /run tensorflow_latest-gpu-jupyter.sif) 
Most docker containers run successfully under Singularity Some need to be run with special options
Few cannot be used 
Docker is optimized for running services in isolated containers 

Need to add back other cluster filesystems with -B option... 
singularity exec --contain -B /project -B /archive 

singularity exec -B /scratch/s1234:/scratch --pwd /scratch/scratch/s1234:/scratch --pwd /scratch  /export/home/s1234/Container/openfoam6-paraview54_latest.sif-centos env|more

singularity exec -B /scratch/s1234:/scratch --pwd /scratch/scratch/s1234:/scratch --pwd /scratch  /export/home/s1234/Container/openfoam6-paraview54_latest.sif-centos cat /scratch/singularity_launch.03

look at the runscript, and envrionment
=================================
singularity inspect -e  /export/home/s1234/Container/openfoam6-paraview54_latest.sif-centos

singularity inspect -r  /export/home/s1234/Container/openfoam6-paraview54_latest.sif-centos

singularity exec -B /scratch/s1234:/scratch --pwd /scratch/scratch/s1234:/scratch --pwd /scratch  /export/home/1234/Container/openfoam6-paraview54_latest.sif-centos /.singularity.d/runscript

Another pbs example from an actual run

Code Block
cat pbs.01
>>>>
#!/bin/bash 
#PBS -m e
#PBS -M email@griffith.edu.au
#PBS -N CEINMS256Calib
#PBS -q medium
#PBS -l select=1:ncpus=4:mem=16gb,walltime=30:00:00
cd  $PBS_O_WORKDIR
singularity exec -B /scratch/s123456:/scratch --pwd /scratch/s123456:/scratch --pwd /scratch  /export/home/s123456/Container/ceinms_latest.sif "/scratch/Scripts/ceinmsLauncher.sh"
exit
sleep 2
>>>>>>

cat /scratch/s2984644/Scripts/ceinmsLauncher.sh
>>>>>>
export LD_LIBRARY_PATH=/usr/local/lib:/opensim/opensim_install/lib
export PATH=/CEINMS/install/bin:$PATH
CEINMScalibrate -S '/scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/setupCalibration_t00000000.xml'
>>>>>>
Before you submit the job, make sure it is executable. You do that with this:
chmod 700 /scratch/s2984644/Scripts/ceinmsLauncher.sh
>>>>>>
qsub pbs.01
>>>>>
Results:
+-+-+-+-+-+-+
|C|E|I|N|M|S|
+-+-+-+-+-+-+-+-+-+-+
|C|a|l|i|b|r|a|t|e|d|
+-+-+-+-+-+-+-+-+-+-+-+-+
|E|M|G|-|I|n|f|o|r|m|e|d|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|N|e|u|r|o|m|u|s|c|u|l|o|s|k|e|l|e|t|a|l|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|T|o|o|l|b|o|x|
+-+-+-+-+-+-+-+

CEINMScalibrate version 0.30.1
Copyright (C) Nov  3 2022
Claudio Pizzolato, Monica Reggiani, Massimo Sartori, David Lloyd
Software developers: Claudio Pizzolato, Monica Reggiani
readNMSmodelCfg
filesystem error: cannot make canonical path: No such file or directory [/scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/subjectCalibrated_t00000000.xml]Reading subject file: /scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/uncalibrated.xml .
Contact model found
Calibration configuration
 - Algorithm
 -- Simulated Annealing
 --- noEpsilon 4
 --- NS 15
 --- NT 5
 --- maxNoEval 200000
 --- rt 0.3
 --- T 20
 --- epsilon 1e-05
 - NMSmodel
 - CalibrationSteps
 -- Step
 Objective Function: TorqueErrorNormalised
 - Targets Type: Torque
 - Targets: hip_flexion_r knee_angle_r ankle_angle_r 
 - Weight: 1
 - Exponent: 1
 - Trials
 -- /scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/running10.xml
 -- /scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/running11.xml
 -- /scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/running7.xml


Reading subject file: /scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/uncalibrated.xml .
activeForceLength
passiveForceLength
forceVelocity
tendonForceStrain
Assuming addbrev_r pennation angle in radians: 0.114781
Assuming addlong_r pennation angle in radians: 0.13777
Assuming addmagDist_r pennation angle in radians: 0.194705
Assuming addmagIsch_r pennation angle in radians: 0.168044
Assuming addmagMid_r pennation angle in radians: 0.207308
Assuming addmagProx_r pennation angle in radians: 0.311483
<snip>
EMG: Reading emg file.../scratch/data/Dev02/Barefoot/ceinms/calibratedSubjects/../../dynamicElaborations/running10/emg.mot
Muscle excitations to muscle mapping:
addbrev_r -> addbrev_r
addlong_r -> addlong_r
addmagDist_r -> addmagDist_r
addmagIsch_r -> addmagIsch_r
addmagMid_r -> addmagMid_r
addmagProx_r -> addmagProx_r
bflh_r -> bflh_r
bfsh_r -> bfsh_r
edl_r -> edl_r
ehl_r -> ehl_r
fdl_r -> fdl_r

<snip>





>>>>




Reference

  1. http://singularity.lbl.gov/
  2. https://www.singularity-hub.org/
  3. https://singularityhub.github.io/containers/registry/singularity-hub-registry/
  4. https://singularity.lbl.gov/user-guide
  5. https://hpc.research.uts.edu.au/software_general/singularity/
  6. https://cran.r-project.org/web/views/HighPerformanceComputing.html
  7. https://support.pawsey.org.au/documentation/display/US/Running+RStudio+on+Zeus+with+Singularity
  8. https://www.katacoda.com/courses/docker
  9. https://pawseysc.github.io/containers-bioinformatics-workshop/5.build/index.html
  10. https://quay.io/
  11. https://pawseysc.github.io/containers-bioinformatics-workshop/3.pipeline/index.html
  12. https://ist.mit.edu/xwin32
  13. https://pawseysc.github.io/containers-bioinformatics-workshop/1.prep1-ssh/index.html

...