OrthoMCL
ISU HPC has created a singularity container based on the Docker container from https://hub.docker.com/r/granek/orthomcl/.
These instructions assume that you are working in the same directory as when you downloaded and started the MySQL server container.
1. Get the image:
$ singularity pull --name orthomcl.simg shub://ISU-HPC/orthomcl
2. Prepare the appropriate configuration files . A sample configuration file may be found on the ISU HPC GitHub site.
$ curl https://raw.githubusercontent.com/ISU-HPC/orthomcl/master/orthomcl.config > \
${PWD}/orthomcl.config
3. Within the MySQL server container, create the orthomcl database.
$ singularity exec instance://mysql mysqladmin create orthomcl
Connecting to the local MySQL server (both containers on same host)
4. Start a shell inside the orthomcl container. Note that we are bind-mounting ${PWD}/mysql/run/mysqld into the container so that the mysql client within the container can communicate with the server running in our first container.
$ singularity shell --bind $PWD \
--bind ${PWD}/mysql/run/mysqld:/run/mysqld \
./orthomcl.simg
5. Within the OrthoMCL container, initialize the orthomcl database.
$ singularity orthomcl.simg:~> orthomclInstallSchema orthomcl.config
6. Run other OrthoMCL commands within the container in a similar fashion.
Connecting to a remote MySQL server (containers on different hosts)
4. Update orthomcl.config to specify a remote database configuration.
dbConnectString=dbi:mysql:orthomcl:localhost
dbLogin=root
dbPassword=my-secret-pw
becomes
dbConnectString=dbi:mysql:orthomcl:HOSTNAME
dbLogin=remote_usr
dbPassword=PASSWORD_FOR_remote_usr
5. Start a shell inside the orthomcl container. Note that we are not bind-mounting ${PWD}/mysql/run/mysqld into the container. Even if ${PWD} is on a network-based file system and shared between the hosts, the local socket is not accessible on the other hosts.
$ singularity shell --bind $PWD ./orthomcl.simg
6. Within the OrthoMCL container, initialize the orthomcl database.
$ singularity orthomcl.simg:~> orthomclInstallSchema orthomcl.config
7. Run other OrthoMCL commands within the container in a similar fashion.