/
Dockerfile
107 lines (88 loc) · 2.95 KB
/
Dockerfile
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
FROM ubuntu:16.04
ARG username
ARG password
RUN apt-get update && apt-get install -y \
build-essential \
software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install -y \
gcc-8 \
g++-8 \
git \
wget \
unzip \
libgsl-dev \
libboost-all-dev
# Set the working directory to /app
WORKDIR /
# Install Anaconda
RUN wget https://repo.anaconda.com/archive/Anaconda3-5.3.0-Linux-x86_64.sh
RUN bash Anaconda3-5.3.0-Linux-x86_64.sh -b
RUN rm Anaconda3-5.3.0-Linux-x86_64.sh
# Add Conda to PATH
ENV PATH /root/anaconda3/bin:$PATH
# Create Conda environment
RUN conda create -n pitt_env python=3.7.0 pip -y
RUN pip install --upgrade pip
RUN pip install jupyter \
plotly \
xlrd \
indra
# Install MCL
RUN wget https://micans.org/mcl/src/mcl-latest.tar.gz
RUN tar xzf mcl-latest.tar.gz
WORKDIR /mcl-14-137
RUN ./configure --prefix=$HOME/local
RUN make install
WORKDIR /
# Install DySE
RUN git clone https://$username:$password@bitbucket.org/biodesignlab/framework.git
ENV FRAMEWORKPATH $HOME/framework
# Install automake
RUN apt-get install -y automake
RUN ln -s /usr/bin/aclocal-1.15 /usr/bin/aclocal-1.14
# Install Dishwrap
WORKDIR ${FRAMEWORKPATH}/Checking/dishwrap_v1.0/dishwrap
RUN make
WORKDIR ${FRAMEWORKPATH}/Checking/dishwrap_v1.0/monitor
RUN make
# Install Cudd for sensitivity analysis
WORKDIR ${FRAMEWORKPATH}/Sensitivity/cudd-3.0.0
RUN ./configure
RUN make
RUN make install
# Update PATH variable
ENV PATH "${FRAMEWORKPATH}/Checking/dishwrap_v1.0/dishwrap:$PATH"
ENV PATH "${FRAMEWORKPATH}/Checking/dishwrap_v1.0/monitor:$PATH"
ENV PATH "${FRAMEWORKPATH}/Sensitivity/Dynamic:$PATH"
ENV PATH "${FRAMEWORKPATH}/Sensitivity/Static:$PATH"
# Install DySE
RUN cd ${FRAMEWORKPATH}; python setup.py install
# Obtain WM Example Notebook and configure directories
WORKDIR /
RUN wget https://s3.amazonaws.com/world-modelers/repos/dyse-wm-example.zip
RUN unzip dyse-wm-example.zip
RUN mkdir Site_Visit_Demo/a Site_Visit_Demo/a/b/ Site_Visit_Demo/a/b/c
RUN mv Site_Visit_Demo/API Site_Visit_Demo/a/b/c/API
RUN mv Site_Visit_Demo/files Site_Visit_Demo/a/b/c/files
RUN wget https://s3.amazonaws.com/world-modelers/data/style.js
RUN mv style.js Site_Visit_Demo/a/b/c/API/style.js
RUN wget https://s3.amazonaws.com/world-modelers/data/DySE_tests.ipynb
RUN mv DySE_tests.ipynb Site_Visit_Demo/a/b/c/API/DySE_tests.ipynb
RUN mkdir Code
RUN mv framework Code/Framework
# Install CytoscapeJS
RUN apt-get install -y npm
RUN npm install webpack -g
RUN wget https://deb.nodesource.com/setup_6.x && bash setup_6.x
RUN apt-get install -y nodejs
# RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN git clone https://github.com/cytoscape/jupyter-cytoscape.git
WORKDIR jupyter-cytoscape
RUN sed '/notebook/d' -i makefile
RUN make
# Make port 8888 available to the world outside this container
EXPOSE 8888
# Run Jupyter Notebook
WORKDIR /
CMD jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token='' --NotebookApp.password=''