victorsndvg / apache

Testing running an apache server with paraview in Singularity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paraview with Singularity

This is an example of running paraview with Singularity (as an instance) to allow for the apache server. It is based on this Dockerfile as a base. You can build the image:

$ sudo singularity build paraview-web.simg Singularity

Make a folder to bind to on the host:

$ mkdir -p /tmp/apache2

Start the container instance, here we are naming it "apache." Since we need writable to /var/lock we must be sudo. :/

$ sudo singularity instance.start --bind /tmp/apache2:/var/run/apache2 paraview-web.simg apache

This should get apache2 running on localhost:

apache.png

Note that you must stop local web servers, including any Docker applications running on that port. I'm not privy to how paraview works, but given this setup you should be able to figure it out from here. Here is how to shell into the container:

$ sudo singularity shell instance://apache

And to stop the container, you also need sudo

$ sudo singularity instance.stop instance://apache

I'm not sure if this is reasonable to run in user space because of needing write to /var/lock. Using sudo with singularity seems to defeat the purpose. If you figure out a good approach please send a pull request to this repository!

Note that if you are using Singularity 3.0 and up the instance group is now changed to "instance stop" and "instance start"

About

Testing running an apache server with paraview in Singularity

License:GNU Affero General Public License v3.0


Languages

Language:Python 50.9%Language:JavaScript 46.9%Language:HTML 1.9%Language:CSS 0.3%