File: README.Rmd

package info (click to toggle)
r-cran-m2r 1.0.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 488 kB
  • sloc: cpp: 195; python: 59; sh: 14; makefile: 2
file content (68 lines) | stat: -rw-r--r-- 2,321 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
output:
  md_document:
    variant: markdown_github
---

# Creating your own __m2r__ Amazon cloud server


## EC2

Begin by getting your own [Amazon EC2](https://aws.amazon.com/ec2/)
instance running.  For an operating system, any Unix-alike should
work; we used the [Amazon Linux
AMI](https://aws.amazon.com/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:
```{bash eval=FALSE}
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
```
<!-- Using your favorite text editor, in the file `/etc/rc.local`, add the -->
<!-- following line -->
<!-- ```{bash eval=FALSE} -->
<!-- cd /home/ec2-user/m2rserver; python m2rserver.py -->
<!-- ``` -->
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](https://www.docker.com) on your machine. Your
method of doing this will depend on what distribution you use. For the
Amazon Linux AMI,
[yum](https://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified)
should work, see instructions [here](https://docs.docker.com/engine/installation/linux/centos/).
Once docker has been installed, run
```{bash eval=FALSE}
docker pull sommars/m2r
```
to install our docker image on your machine. As of June 2017, the
image comes provisioned with
[Macaulay2](http://www.math.uiuc.edu/Macaulay2/),
[PHCpack](http://homepages.math.uic.edu/~jan/download.html),
[Bertini](https://bertini.nd.edu), [4ti2](http://www.4ti2.de), and
[LattE](https://www.math.ucdavis.edu/~latte/).

### Local changes

When you use __m2r__, after loading the package, each time you must
run the command 
```{r eval=FALSE}
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.