Skip to content

Commit 6a56948

Browse files
authored
Merge pull request #292 from openworm/development
v0.9 Dockerfile release!
2 parents 5c0b60e + 53faeb3 commit 6a56948

File tree

14 files changed

+429
-154
lines changed

14 files changed

+429
-154
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.git
2+
.github
3+
.DS_Store
4+
.gitignore
5+
.openworm.yml
6+
output

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
.DS_Store
22
output/C2*
3+
/rebuild.sh
4+
/output/siminfo.py
5+
/output/wor*

Dockerfile

Lines changed: 91 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
FROM ubuntu:16.04
22

3-
MAINTAINER David Lung "[email protected]"
4-
3+
LABEL maintainer="David Lung ([email protected]); Padraig Gleeson ([email protected])"
54

65
ARG INTEL_SDK_VERSION=2017_7.0.0.2511_x64
76

8-
COPY ./silent-intel-sdk.cfg /tmp/silent-intel-sdk.cfg
7+
#COPY ./silent-intel-sdk.cfg /tmp/silent-intel-sdk.cfg
98

109

1110
ARG USR=ow
1211
ENV USER=$USR
1312

14-
1513
RUN apt-get update && \
1614
apt-get upgrade -y && \
1715
apt-get dist-upgrade -y
1816

19-
20-
2117
RUN mkdir -p /etc/sudoers.d && \
2218
export uid=1000 gid=1000 && \
2319
mkdir -p /home/$USER && \
@@ -34,39 +30,23 @@ ENV DEBIAN_FRONTEND noninteractive # TODO: change
3430
#RUN useradd -ms /bin/bash $USER
3531

3632

33+
################################################################################
34+
######## Update/install essential libraries
35+
3736
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
38-
wget \
39-
nano \
40-
htop \
41-
build-essential \
42-
make \
43-
git \
44-
automake \
45-
autoconf \
46-
g++ \
47-
rpm \
48-
libtool \
49-
libncurses5-dev \
50-
zlib1g-dev \
51-
bison \
52-
flex \
53-
lsb-core \
54-
sudo \
55-
xorg \
56-
openbox \
57-
x11-xserver-utils \
37+
wget nano htop build-essential make git automake autoconf \
38+
g++ rpm libtool libncurses5-dev zlib1g-dev bison flex lsb-core \
39+
sudo xorg openbox x11-xserver-utils \
5840
libxext-dev libncurses-dev python-dev mercurial \
5941
freeglut3-dev libglu1-mesa-dev libglew-dev python-dev python-pip python-lxml python-numpy python-scipy python-tk \
60-
kmod dkms \
61-
linux-source linux-headers-generic \
42+
kmod dkms linux-source linux-headers-generic \
6243
maven openjdk-8-jdk \
6344
python-setuptools python-yaml libnuma1 \
64-
openmpi-bin libopenmpi-dev \
45+
openmpi-bin libopenmpi-dev \
6546
libgl1-mesa-glx libgl1-mesa-dri libfreetype6-dev \
6647
libpng12-dev libxft-dev python-matplotlib xubuntu-desktop ffmpeg xvfb tmux
6748

68-
#RUN sudo pip install --upgrade matplotlib
69-
49+
#RUN sudo pip install --upgrade pip
7050
#RUN sudo apt-get install nvidia-opencl-dev
7151

7252
RUN sudo usermod -a -G video $USER
@@ -75,6 +55,9 @@ USER $USER
7555
ENV HOME /home/$USER
7656
WORKDIR $HOME
7757

58+
################################################################################
59+
######## Install NEURON simulator
60+
7861
RUN mkdir neuron && \
7962
cd neuron && \
8063
git clone https://github.com/nrnhines/iv.git && \
@@ -94,49 +77,50 @@ RUN mkdir neuron && \
9477
cd src/nrnpython && \
9578
sudo python setup.py install
9679

97-
RUN mkdir intel-opencl-tmp && \
98-
cd intel-opencl-tmp && \
99-
mkdir intel-opencl && \
100-
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip && \
101-
unzip SRB5.0_linux64.zip && \
102-
tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz && \
103-
tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz && \
104-
tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz && \
105-
sudo cp -R intel-opencl/* / && \
106-
sudo ldconfig && \
107-
cd .. && \
108-
sudo rm -r intel-opencl-tmp
109-
110-
RUN wget http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/11705/intel_sdk_for_opencl_$INTEL_SDK_VERSION.tgz && \
111-
tar xvf intel_sdk_for_opencl_$INTEL_SDK_VERSION.tgz && \
112-
cd intel_sdk_for_opencl_$INTEL_SDK_VERSION && \
113-
sudo ./install.sh --silent /tmp/silent-intel-sdk.cfg && \
114-
cd $HOME && \
115-
rm intel_sdk_for_opencl_$INTEL_SDK_VERSION.tgz && \
116-
sudo rm /tmp/silent-intel-sdk.cfg
11780

81+
################################################################################
82+
######## Install pyNeuroML for handling NeuroML network model
83+
11884
RUN git clone https://github.com/NeuroML/pyNeuroML.git && \
11985
cd pyNeuroML && \
120-
git checkout ow-0.8a && \
86+
git checkout ow-0.9 && \
12187
sudo python setup.py install
12288

89+
90+
################################################################################
91+
######## Install PyOpenWorm
92+
93+
RUN pip install pyparsing==2.0.3 Jinja2==2.11.1 configparser==4.0.2 GitPython==3.0.7 gitdb2==2.0.6
12394
RUN git clone https://github.com/openworm/PyOpenWorm.git && \
12495
cd PyOpenWorm && \
125-
git checkout 7ff1266 && \
96+
git checkout ow-0.9 && \
97+
sudo apt-get install -y python-cffi && \
98+
sudo python setup.py install && \
99+
pow clone https://github.com/openworm/OpenWormData.git
100+
101+
102+
################################################################################
103+
######## Install c302 for building neuronal network models
104+
105+
RUN git clone https://github.com/openworm/c302.git && \
106+
cd c302 && \
107+
git checkout ow-0.9 && \
126108
sudo python setup.py install
127109

128-
RUN git clone https://github.com/openworm/CElegansNeuroML.git && \
129-
cd CElegansNeuroML && \
130-
# Pointing this at a recent commit that adds python 3 support!
131-
# https://github.com/openworm/CElegansNeuroML/commit/c8b13642d79335bb8157431b83624e33d50a166e
132-
git checkout c8b1364
110+
111+
################################################################################
112+
######## Install Sibernetic for the worm body model
133113

134114
RUN git clone https://github.com/openworm/sibernetic.git && \
135115
cd sibernetic && \
136-
# fixed to a specific commit in development branch:
137-
# https://github.com/openworm/sibernetic/commit/3eb9914db040fff852cba76ef8f4f39d0bed3294
138-
git checkout 3eb9914 && \
139-
make clean && make all
116+
# fixed to a specific branch
117+
git checkout ow-0.9
118+
119+
RUN cp c302/pyopenworm.conf sibernetic/ # Temp step until PyOpenWorm can be run from any dir...
120+
121+
122+
################################################################################
123+
######## Set some paths//environment variables
140124

141125
ENV JNML_HOME=$HOME/jNeuroML
142126
ENV PATH=$PATH:$JNML_HOME
@@ -145,10 +129,53 @@ ENV N=$HOME/neuron/nrn
145129
ENV CPU=x86_64
146130
ENV PATH=$PATH:$IV/$CPU/bin:$N/$CPU/bin
147131
ENV NEURON_HOME=$N/$CPU
148-
ENV C302_HOME=$HOME/CElegansNeuroML/CElegans/pythonScripts/c302
132+
ENV C302_HOME=$HOME/c302/c302
149133
ENV SIBERNETIC_HOME=$HOME/sibernetic
150-
ENV PYTHONPATH=$PYTHONPATH:$C302_HOME:$SIBERNETIC_HOME
134+
ENV PYTHONPATH=$PYTHONPATH:$HOME/c302:$SIBERNETIC_HOME
151135

152136
# Not working with --chown=$USER:$USER
153137
COPY ./master_openworm.py $HOME/master_openworm.py
154138
RUN sudo chown $USER:$USER $HOME/master_openworm.py
139+
140+
141+
################################################################################
142+
######## Install Intel OpenCL libraries needed for Sibernetic
143+
144+
RUN mkdir intel-opencl-tmp && \
145+
cd intel-opencl-tmp && \
146+
mkdir intel-opencl && \
147+
wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip && \
148+
unzip SRB5.0_linux64.zip && \
149+
tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz && \
150+
tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz && \
151+
tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz && \
152+
sudo cp -R intel-opencl/* / && \
153+
sudo ldconfig && \
154+
cd .. && \
155+
sudo rm -r intel-opencl-tmp
156+
157+
RUN sudo cp -R /opt/intel/opencl/include/CL /usr/include/ && \
158+
sudo apt install -y ocl-icd-opencl-dev
159+
#sudo ln -s /opt/intel/opencl/libOpenCL.so.1 /usr/lib/libOpenCL.so
160+
161+
162+
################################################################################
163+
######## Build Sibernetic
164+
165+
RUN cd sibernetic && \
166+
make clean && make all
167+
168+
# intel i5, hd 5500, linux 4.15.0-39-generic
169+
# ./Release/Sibernetic -f worm -no_g device=CPU 190ms
170+
# ./Release/Sibernetic -f worm -no_g device=GPU 150ms (initialization takes some time)
171+
172+
# Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz, linux 4.4.0-139-generic
173+
# ./Release/Sibernetic -f worm -no_g device=CPU 60ms
174+
#
175+
# after installing the nvidia driver used in host:
176+
## wget http://us.download.nvidia.com/tesla/390.30/nvidia-diag-driver-local-repo-ubuntu1604-390.30_1.0-1_amd64.deb
177+
## sudo dpkg -i nvidia-diag-driver-local-repo-ubuntu1604-390.30_1.0-1_amd64.deb
178+
## sudo apt-key add /var/nvidia-diag-driver-local-repo-390.30/7fa2af80.pub
179+
## sudo apt-get update
180+
## sudo apt-get install -y cuda-drivers
181+
# ./Release/Sibernetic -f worm -no_g device=GPU 37ms

0 commit comments

Comments
 (0)