--- author: Scott Perkins date: 2022-12-23 title: Running with Singularity --- # Running with Singularity There are a few ways to run this code through a singularity container (which are much more common on scientific HPC clusters than Docker), and below is outlined an example workflow one might use (but definitely not the only way one can accomplish this). This example will be done in the context of running on a cluster implementing SLURM, but that can be easily modified to suit the desired environment. ## via Docker The method built around Docker will utilize the maintained images on DockerHub (e.g. scottperkins/gwat and scottperkins/gw.base.deps primarily). If one creates one's own [docker image with custom development](custom_docker_standalone), simply replace all the instances of ```bash docker://scottperkins/gwat ``` with ```bash docker-archive://Docker-image.tgz ``` ### Run the pre-packaged executables In this section, the steps to run the pre-packaged executables will be outlined. For example, we will show how to use the "mcmc_gw_tool_v2" executable to run on pre-downloaded (and pre-processed, if applicable) data from GWOSC. Assuming one is on the remote server, there should be all the necessary data, ``` /project-dir |------param_file.dat |------slurm_submission.sh |------extra_data.dat |------data/ |------------PSD.dat |------------STRAIN.dat ``` In the param_file.dat, there should be all the necessary information to run in the container (appropriate file paths, etc.). A template can be found in "data/sample_config_files". In the slurm_submission.sh, there should be the following steps: ```bash #!/bin/sh #SBATCH --time=