Permalink
Browse files

Merge pull request #45 from ahellander/gmsh_and_gillespy

Gmsh and gillespy
  • Loading branch information...
ahellander committed Sep 19, 2015
2 parents 4c286b1 + aa006ee commit 4492b34fe1f284216bd185d4d4d88a201af282fc
Showing with 76 additions and 37 deletions.
  1. +69 −35 MolnsLib/installSoftware.py
  2. +7 −2 README.md
View
@@ -16,14 +16,16 @@ class InstallSW:
This class is used for installing software
'''
# Install the necessary software for IPython and PyURDME.
# Contextualization, install the software for IPython and PyURDME.
# Commands can be specified in 3 ways:
# 1: a string
# 2: a list a strings
# 3: a tuple, where the first item is a list of string and the 2nd item is a string. The second
# item is a 'check' command, which should error (return code 1) if the first item(s) did not
# install correctly
command_list = [
# Basic contextualization
"curl http://www.ubuntu.com", # Check to make sure networking is up.
"sudo apt-get update",
"sudo apt-get -y install git",
@@ -32,68 +34,100 @@ class InstallSW:
"sudo apt-get -y install python-matplotlib python-numpy python-scipy",
"sudo apt-get -y install make",
"sudo apt-get -y install python-software-properties",
"sudo add-apt-repository -y ppa:fenics-packages/fenics",
"sudo apt-get update",
"sudo apt-get -y install fenics",
"sudo apt-get -y install cython python-h5py",
"sudo apt-get -y install python-pip python-dev build-essential",
"sudo pip install pyzmq --upgrade",
"sudo pip install dill cloud pygments",
"sudo pip install tornado Jinja2",
# Molnsutil
[
"sudo pip install jsonschema jsonpointer",
# EC2/S3 and OpenStack APIs
"sudo pip install boto",
"sudo apt-get -y install pandoc",
# This set of packages is needed for OpenStack, as molnsutil uses them for hybrid cloud deployment
"sudo apt-get -y install libxml2-dev libxslt1-dev python-dev",
"sudo pip install python-novaclient",
"sudo easy_install -U pip",
"sudo pip install python-keystoneclient",
"sudo pip install python-swiftclient",
],
[
"sudo rm -rf /usr/local/molnsutil;sudo mkdir -p /usr/local/molnsutil;sudo chown ubuntu /usr/local/molnsutil",
"cd /usr/local/ && git clone https://github.com/Molns/molnsutil.git",
"cd /usr/local/molnsutil && sudo python setup.py install"
],
# For molnsutil
"sudo pip install jsonschema jsonpointer",
# S3 and OS APIs
"sudo pip install boto",
"sudo apt-get -y install pandoc",
# This set of packages is really only needed for OpenStack, but molnsutil uses them
"sudo apt-get -y install libxml2-dev libxslt1-dev python-dev",
"sudo pip install python-novaclient",
"sudo easy_install -U pip",
"sudo pip install python-keystoneclient",
"sudo pip install python-swiftclient",
# So the workers can mount the controller via SSHfs
[ "sudo apt-get -y install sshfs",
"sudo gpasswd -a ubuntu fuse",
"echo 'ServerAliveInterval 60' >> /home/ubuntu/.ssh/config",
],
# FOR DEVELOPMENT, NEEDS TO BE TESTED
# High-performance ssh-hpn
#[
# "sudo add-apt-repository ppa:w-rouesnel/openssh-hpn -y",
# "sudo apt-get update -y",
#],
# IPython install
# IPython
[ "sudo rm -rf ipython;git clone --recursive https://github.com/Molns/ipython.git",
"cd ipython && git checkout 3.0.0-molns_fixes && python setup.py submodule && sudo python setup.py install",
"sudo rm -rf ipython",
"ipython profile create default",
"sudo pip install terminado", #Jupyter terminals
"python -c \"from IPython.external import mathjax; mathjax.install_mathjax(tag='2.2.0')\""
],
### Simulation software related to pyurdme and StochSS
# Gillespy
[ "sudo rm -rf /usr/local/StochKit;sudo mkdir -p /usr/local/StochKit;sudo chown ubuntu /usr/local/StochKit",
"cd /usr/local/ && git clone https://github.com/StochSS/stochkit.git StochKit",
"cd /usr/local/StochKit && ./install.sh",
"sudo rm -rf /usr/local/ode-1.0.2;sudo mkdir -p /usr/local/ode-1.0.2/;sudo chown ubuntu /usr/local/ode-1.0.2",
"wget https://github.com/StochSS/stochss/blob/master/ode-1.0.2.tgz?raw=true -q -O /tmp/ode.tgz",
"cd /usr/local/ && tar -xzf /tmp/ode.tgz",
"rm /tmp/ode.tgz",
"cd /usr/local/ode-1.0.2/cvodes/ && tar -xzf \"cvodes-2.7.0.tar.gz\"",
"cd /usr/local/ode-1.0.2/cvodes/cvodes-2.7.0/ && ./configure --prefix=\"/usr/local/ode-1.0.2/cvodes/cvodes-2.7.0/cvodes\" 1>stdout.log 2>stderr.log",
"cd /usr/local/ode-1.0.2/cvodes/cvodes-2.7.0/ && make 1>stdout.log 2>stderr.log",
"cd /usr/local/ode-1.0.2/cvodes/cvodes-2.7.0/ && make install 1>stdout.log 2>stderr.log",
"cd /usr/local/ode-1.0.2/ && STOCHKIT_HOME=/usr/local/StochKit/ STOCHKIT_ODE=/usr/local/ode-1.0.2/ make 1>stdout.log 2>stderr.log",
"sudo rm -rf /usr/local/gillespy;sudo mkdir -p /usr/local/gillespy;sudo chown ubuntu /usr/local/gillespy",
"cd /usr/local/ && git clone https://github.com/MOLNs/gillespy.git",
"cd /usr/local/gillespy && sudo STOCHKIT_HOME=/usr/local/StochKit/ STOCHKIT_ODE_HOME=/usr/local/ode-1.0.2/ python setup.py install"
],
# FeniCS/Dolfin/pyurdme
[ "sudo add-apt-repository -y ppa:fenics-packages/fenics",
"sudo apt-get update",
"sudo apt-get -y install fenics",
# Gmsh for Finite Element meshes
"sudo apt-get install -y gmsh",
],
# pyurdme
[ "sudo rm -rf /usr/local/pyurdme;sudo mkdir -p /usr/local/pyurdme;sudo chown ubuntu /usr/local/pyurdme",
"cd /usr/local/ && git clone https://github.com/MOLNs/pyurdme.git",
"cd /usr/local/pyurdme && git checkout develop",
#"cd /usr/local/pyurdme && git checkout develop", # for development only
"cp /usr/local/pyurdme/pyurdme/data/three.js_templates/js/* .ipython/profile_default/static/custom/",
"source /usr/local/pyurdme/pyurdme_init && python -c 'import pyurdme'",
],
# example notebooks
[ "rm -rf MOLNS_notebooks;git clone https://github.com/Molns/MOLNS_notebooks.git",
"cp MOLNS_notebooks/*.ipynb .;rm -rf MOLNS_notebooks;",
"ls *.ipynb"
],
[
"sudo rm -rf /usr/local/molnsutil;sudo mkdir -p /usr/local/molnsutil;sudo chown ubuntu /usr/local/molnsutil",
"cd /usr/local/ && git clone https://github.com/Molns/molnsutil.git",
"cd /usr/local/molnsutil && sudo python setup.py install"
],
"python -c \"from IPython.external import mathjax; mathjax.install_mathjax(tag='2.2.0')\"",
# Upgrade scipy from pip to get rid of six.py bug on Trusty
# Upgrade scipy from pip to get rid of super-annoying six.py bug on Trusty
"sudo apt-get -y remove python-scipy",
"sudo pip install scipy",
"sudo pip install jsonschema jsonpointer", #redo this install to be sure it has not been removed.
"sync", # This is critial for some infrastructures.
]
View
@@ -1,6 +1,10 @@
# MOLNs spatial stochastic simulation appliance #
MOLNs is a cloud appliance that will set up, start and manage a virtual platform for scalable, distributed computational experiments using PyURDME (www.pyurdme.org).
MOLNs is a cloud appliance that will set up, start and manage a virtual platform for scalable, distributed computational experiments using (spatial) stochastic simulation software such as PyURDME (www.pyurdme.org) and StochKit/Gillespy (www.github.com/Gillespy/gillespy). In addition, MOLNs by default makes FEniCS/Dolfin available as-a Service.
Since MOLNs will configure and manage a virtual IPython Cluster (with a Notebook frontend), with Numpy, SciPy and Ipython Parallel enabled, it can also be useful for general contextualization and management of dynamic, cloud-agnostic (supports EC2 and OpenStack-based clouds) virtual IPython environments, even if you are not into spatial stochstic simulations in systems biology.
Note: MOLNs is currenly compatible only with 'EC2-Classic', we are working on supporting Amazon VPC.
### Prerequisites ###
To use MOLNs, you need valid credentials to an OpenStack cloud, Amazon Elastic Compute Cloud (EC2) or HP Helion public cloud. You also need Python, and the following packages:
@@ -71,9 +75,10 @@ To set up a start a MOLNs virtual platform named "molns-test" in a cloud provide
$ molns start molns-test
$ molns worker start molns-test-workers
You will be presented with a URL for the controller node of your platform. Navigate there using a browser (Google Chrome or Firefox are recommended). The easiest way to get started using the platform is to dive into one of the provided tutorial notebooks that are made available in every fresh MOLNs virtual platform.
You will be presented with a URL for the controller node of your platform. Navigate there using a browser (Google Chrome is strongly recommended, and Safari should be avoided). The easiest way to get started using the platform is to dive into one of the provided tutorial notebooks that are made available in every fresh MOLNs virtual platform.
For a complete list of the valid subcommands for molns, type
$ molns help
### Above commands explained ###

0 comments on commit 4492b34

Please sign in to comment.