1- FROM ubuntu:18 .04
1+ FROM ubuntu:16 .04
22
3- MAINTAINER David Lung "
[email protected] "
3+ # For generating/running a Dockerfile image based on Python 2
4+ # Note: Python 2 is no longer officially supported and this Docker image will
5+ # probably stop working eventually...
46
7+ LABEL maintainer="David Lung (
[email protected] ); Padraig Gleeson (
[email protected] )"
58
69ARG INTEL_SDK_VERSION=2017_7.0.0.2511_x64
710
@@ -31,38 +34,23 @@ ENV DEBIAN_FRONTEND noninteractive # TODO: change
3134#RUN useradd -ms /bin/bash $USER
3235
3336
37+ ################################################################################
38+ ######## Update/install essential libraries
39+
3440RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
35- wget \
36- nano \
37- htop \
38- build-essential \
39- make \
40- git \
41- automake \
42- autoconf \
43- g++ \
44- rpm \
45- libtool \
46- libncurses5-dev \
47- zlib1g-dev \
48- bison \
49- flex \
50- lsb-core \
51- sudo \
52- xorg \
53- openbox \
54- x11-xserver-utils \
55- libxext-dev libncurses-dev python3-dev mercurial \
56- freeglut3-dev libglu1-mesa-dev libglew-dev python3-dev python3-pip python3-lxml python3-numpy python3-scipy python3-tk \
57- kmod dkms \
58- linux-source linux-headers-generic \
41+ wget nano htop build-essential make git automake autoconf \
42+ g++ rpm libtool libncurses5-dev zlib1g-dev bison flex lsb-core \
43+ sudo xorg openbox x11-xserver-utils \
44+ libxext-dev libncurses-dev python-dev mercurial \
45+ freeglut3-dev libglu1-mesa-dev libglew-dev python-dev python-pip python-lxml python-numpy python-scipy python-tk \
46+ kmod dkms linux-source linux-headers-generic \
5947 maven openjdk-8-jdk \
60- python3-setuptools python3-yaml libnuma1 \
61- openmpi-bin libopenmpi-dev \
62- libgl1-mesa-glx libgl1-mesa-dri libfreetype6-dev \
63- libxft-dev python3-matplotlib xubuntu-desktop ffmpeg xvfb tmux
64-
48+ python-setuptools python-yaml libnuma1 \
49+ openmpi-bin libopenmpi-dev \
50+ libgl1-mesa-glx libgl1-mesa-dri libfreetype6-dev \
51+ libpng12-dev libxft-dev python-matplotlib unzip ffmpeg xvfb tmux
6552
53+ #RUN sudo pip install --upgrade pip
6654#RUN sudo apt-get install nvidia-opencl-dev
6755
6856RUN sudo usermod -a -G video $USER
@@ -71,6 +59,9 @@ USER $USER
7159ENV HOME /home/$USER
7260WORKDIR $HOME
7361
62+ ################################################################################
63+ ######## Install NEURON simulator
64+
7465RUN mkdir neuron && \
7566 cd neuron && \
7667 git clone https://github.com/nrnhines/iv.git && \
@@ -84,44 +75,57 @@ RUN mkdir neuron && \
8475 cd ../nrn && \
8576 git checkout e0950a1 && \
8677 ./build.sh && \
87- ./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/usr/bin/python3 --with-paranrn && \
78+ ./configure --prefix=`pwd` --with-iv=$HOME/neuron/iv --with-nrnpython=/usr/bin/python --with-paranrn && \
8879 make -j3 && \
8980 sudo make install && \
9081 cd src/nrnpython && \
91- sudo python3 setup.py install
82+ sudo python setup.py install
83+
84+
85+ ################################################################################
86+ ######## Install pyNeuroML for handling NeuroML network model
9287
93-
88+ RUN pip install cachetools==0.8.0
9489RUN git clone https://github.com/NeuroML/pyNeuroML.git && \
9590 cd pyNeuroML && \
96- git checkout ow-0.9 && \
97- sudo python3 setup.py install
91+ git checkout master && \
92+ sudo python setup.py install
9893
99- RUN pip3 install pyparsing==2.0.3
100- RUN pip3 install Jinja2==2.11.1
101- RUN pip3 install configparser==4.0.2
94+
95+ ################################################################################
96+ ######## Install PyOpenWorm
97+
98+ RUN pip install pyparsing==2.0.3 Jinja2==2.11.1 configparser==4.0.2 GitPython==3.0.7 gitdb2==2.0.6 numpydoc==0.9.2 Sphinx==1.8.3 future==0.18.2 setuptools==41.5.1
10299RUN git clone https://github.com/openworm/PyOpenWorm.git && \
103100 cd PyOpenWorm && \
104101 git checkout ow-0.9 && \
105- sudo apt-get install -y python3 -cffi && \
106- sudo python3 setup.py install && \
102+ sudo apt-get install -y python -cffi && \
103+ sudo python setup.py install && \
107104 pow clone https://github.com/openworm/OpenWormData.git
108105
109- ###############################RUN pyconfif
110106
111- RUN git clone https://github.com/openworm/c302.git && \
107+ ################################################################################
108+ ######## Install c302 for building neuronal network models
109+
110+ RUN git clone https://github.com/openworm/c302.git && \
112111 cd c302 && \
113- git checkout ow-0.9 && \
114- sudo python3 setup.py install
112+ git checkout ow-0.9.1 && \
113+ sudo python setup.py install
114+
115115
116+ ################################################################################
117+ ######## Install Sibernetic for the worm body model
116118
117- RUN git clone https://github.com/pgleeson /sibernetic.git && \
119+ RUN git clone https://github.com/openworm /sibernetic.git && \
118120 cd sibernetic && \
119- # fixed to a specific commit in development branch:
120- # https://github.com/openworm/sibernetic/commit/3eb9914db040fff852cba76ef8f4f39d0bed3294
121- git checkout test_dev
121+ git checkout ow-0.9.1 # fixed to a specific branch
122122
123123RUN cp c302/pyopenworm.conf sibernetic/ # Temp step until PyOpenWorm can be run from any dir...
124124
125+
126+ ################################################################################
127+ ######## Set some paths//environment variables
128+
125129ENV JNML_HOME=$HOME/jNeuroML
126130ENV PATH=$PATH:$JNML_HOME
127131ENV IV=$HOME/neuron/iv
@@ -138,6 +142,9 @@ COPY ./master_openworm.py $HOME/master_openworm.py
138142RUN sudo chown $USER:$USER $HOME/master_openworm.py
139143
140144
145+ ################################################################################
146+ ######## Install Intel OpenCL libraries needed for Sibernetic
147+
141148RUN mkdir intel-opencl-tmp && \
142149 cd intel-opencl-tmp && \
143150 mkdir intel-opencl && \
@@ -155,9 +162,12 @@ RUN sudo cp -R /opt/intel/opencl/include/CL /usr/include/ && \
155162sudo apt install -y ocl-icd-opencl-dev vim
156163#sudo ln -s /opt/intel/opencl/libOpenCL.so.1 /usr/lib/libOpenCL.so
157164
165+
166+ ################################################################################
167+ ######## Build Sibernetic
168+
158169RUN cd sibernetic && \
159- sed -i -e "s/n2.7/n3.6/g" makefile # Use python 3 libs && \
160- make clean && make all
170+ make clean && make all
161171
162172# intel i5, hd 5500, linux 4.15.0-39-generic
163173# ./Release/Sibernetic -f worm -no_g device=CPU 190ms
@@ -175,13 +185,6 @@ RUN cd sibernetic && \
175185# ./Release/Sibernetic -f worm -no_g device=GPU 37ms
176186
177187
178-
179-
180-
181-
182- #### TODO: check that this is the best way to switch to py3...
183- RUN sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
184-
185188RUN echo '\n\nalias cd..="cd .."\nalias h=history\nalias ll="ls -alt"' >> ~/.bashrc
186189
187- RUN echo "Built the OpenWorm Docker image!"
190+ RUN echo "Built the OpenWorm Docker image!"
0 commit comments