Hi Shashi,
Singularity containers can be run equivalently to scripts, so you could just add a line to run/exec a command to the container in any of your standard scripts, for example if I had run.sh:
#!/bin/sh
# other setup stuff
singularity exec /path/to/preproces.img python /scripts/preprocess.py --input1 input1
singularity run /path/to/analysis.img --arg1 param1
and then submit with qsub run.sh as you normally would.
How are you using sun grid engine + ec2 with autoscaling? Are you using something like StarCluster? That' s interesting, I have mostly thought about autoscaling in the context of servers/services. Do you find using the cloud to be affordable? It seems most institutions have (mostly) preference for things that need to scale because firing up instances adds up $$ quickly!
Best,
Vanessa