inst/server/README.md

Creating your own m2r Amazon cloud server

EC2

Begin by getting your own Amazon EC2 instance running. For an operating system, any Unix-alike should work; we used the Amazon Linux AMI. If you prefer not to use a cloud server and would rather use a physical machine, in principle all that follows should work in the same way, though this has not been tested.

Setting up the server

Once you have spun your EC2 instance, log into it and run the following commands that download the m2rserver python script:

mkdir m2rserver
cd m2rserver
curl https://raw.githubusercontent.com/coneill-math/m2r/master/inst/server/m2rserver.py > m2rserver.py
echo 'cd /home/ec2-user/m2rserver; python m2rserver.py' >> /etc/rc.local

The last line will cause the server to start when the system boots. Reboot the instance, and the python script will start listening for a connection.

Next, install docker on your machine. Your method of doing this will depend on what distribution you use. For the Amazon Linux AMI, yum should work, see instructions here. Once docker has been installed, run

docker pull sommars/m2r

to install our docker image on your machine. As of June 2017, the image comes provisioned with Macaulay2, PHCpack, Bertini, 4ti2, and LattE.

Local changes

When you use m2r, after loading the package, each time you must run the command

start_m2(cloud = TRUE, hostname = "host.uri.com")

to initialize a connection to your new host.

Questions?

If you have any issues setting up a server, we're happy to try to help. File an issue and we'll get back to you.



Try the m2r package in your browser

Any scripts or data that you put into this service are public.

m2r documentation built on July 1, 2020, 11:45 p.m.