Skip to content

Commit bd565e5

Browse files
committed
More updates to readme & tidied Dockerfile
1 parent 01972d1 commit bd565e5

File tree

2 files changed

+50
-41
lines changed

2 files changed

+50
-41
lines changed

Dockerfile

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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

@@ -31,39 +30,23 @@ ENV DEBIAN_FRONTEND noninteractive # TODO: change
3130
#RUN useradd -ms /bin/bash $USER
3231

3332

33+
################################################################################
34+
######## Update/install essential libraries
35+
3436
RUN 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 \
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 \
5540
libxext-dev libncurses-dev python-dev mercurial \
5641
freeglut3-dev libglu1-mesa-dev libglew-dev python-dev python-pip python-lxml python-numpy python-scipy python-tk \
57-
kmod dkms \
58-
linux-source linux-headers-generic \
42+
kmod dkms linux-source linux-headers-generic \
5943
maven openjdk-8-jdk \
6044
python-setuptools python-yaml libnuma1 \
61-
openmpi-bin libopenmpi-dev \
45+
openmpi-bin libopenmpi-dev \
6246
libgl1-mesa-glx libgl1-mesa-dri libfreetype6-dev \
6347
libpng12-dev libxft-dev python-matplotlib xubuntu-desktop ffmpeg xvfb tmux
6448

6549
#RUN sudo pip install --upgrade pip
66-
6750
#RUN sudo apt-get install nvidia-opencl-dev
6851

6952
RUN sudo usermod -a -G video $USER
@@ -72,6 +55,9 @@ USER $USER
7255
ENV HOME /home/$USER
7356
WORKDIR $HOME
7457

58+
################################################################################
59+
######## Install NEURON simulator
60+
7561
RUN mkdir neuron && \
7662
cd neuron && \
7763
git clone https://github.com/nrnhines/iv.git && \
@@ -92,11 +78,18 @@ RUN mkdir neuron && \
9278
sudo python setup.py install
9379

9480

81+
################################################################################
82+
######## Install pyNeuroML for handling NeuroML network model
83+
9584
RUN git clone https://github.com/NeuroML/pyNeuroML.git && \
9685
cd pyNeuroML && \
9786
git checkout ow-0.9 && \
9887
sudo python setup.py install
9988

89+
90+
################################################################################
91+
######## Install PyOpenWorm
92+
10093
RUN pip install pyparsing==2.0.3 Jinja2==2.11.1 configparser==4.0.2 GitPython==3.0.7 gitdb2==2.0.6
10194
RUN git clone https://github.com/openworm/PyOpenWorm.git && \
10295
cd PyOpenWorm && \
@@ -105,22 +98,30 @@ RUN git clone https://github.com/openworm/PyOpenWorm.git && \
10598
sudo python setup.py install && \
10699
pow clone https://github.com/openworm/OpenWormData.git
107100

108-
###############################RUN pyconfif
101+
102+
################################################################################
103+
######## Install c302 for building neuronal network models
109104

110105
RUN git clone https://github.com/openworm/c302.git && \
111106
cd c302 && \
112107
git checkout ow-0.9 && \
113108
sudo python setup.py install
114109

115110

116-
RUN git clone https://github.com/pgleeson/sibernetic.git && \
111+
################################################################################
112+
######## Install Sibernetic for the worm body model
113+
114+
RUN git clone https://github.com/openworm/sibernetic.git && \
117115
cd sibernetic && \
118-
# fixed to a specific commit in development branch:
119-
# https://github.com/openworm/sibernetic/commit/3eb9914db040fff852cba76ef8f4f39d0bed3294
120-
git checkout test_dev
116+
# fixed to a specific branch
117+
git checkout ow-0.9
121118

122119
RUN cp c302/pyopenworm.conf sibernetic/ # Temp step until PyOpenWorm can be run from any dir...
123120

121+
122+
################################################################################
123+
######## Set some paths//environment variables
124+
124125
ENV JNML_HOME=$HOME/jNeuroML
125126
ENV PATH=$PATH:$JNML_HOME
126127
ENV IV=$HOME/neuron/iv
@@ -137,6 +138,9 @@ COPY ./master_openworm.py $HOME/master_openworm.py
137138
RUN sudo chown $USER:$USER $HOME/master_openworm.py
138139

139140

141+
################################################################################
142+
######## Install Intel OpenCL libraries needed for Sibernetic
143+
140144
RUN mkdir intel-opencl-tmp && \
141145
cd intel-opencl-tmp && \
142146
mkdir intel-opencl && \
@@ -154,6 +158,10 @@ RUN sudo cp -R /opt/intel/opencl/include/CL /usr/include/ && \
154158
sudo apt install -y ocl-icd-opencl-dev
155159
#sudo ln -s /opt/intel/opencl/libOpenCL.so.1 /usr/lib/libOpenCL.so
156160

161+
162+
################################################################################
163+
######## Build Sibernetic
164+
157165
RUN cd sibernetic && \
158166
make clean && make all
159167

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,38 +67,40 @@ in addition for Linux instructions.
6767

6868
#### **What is the Docker container?**
6969

70-
The Docker container is a self-contained environment in which you can run OpenWorm simulations. It's fully set up to get you started by following the steps above. At the moment, it runs simulations and produces visualizations for you, but these visualizations must be viewed outside of the docker container. While you do not need to know much about Docker to use OpenWorm,
71-
if you are planning on working extensively with the platform, you may benefit
72-
from understanding some basics. [Docker Curriculum](https://docker-curriculum.com)
70+
The Docker container is a self-contained environment in which you can run OpenWorm simulations. It's fully set up to get you started by following the steps above. At the moment,
71+
it runs simulations and produces visualizations for you, but these visualizations must be viewed outside of the Docker container. While you do not need to know
72+
much about Docker to use OpenWorm, if you are planning on working extensively with the platform, you may benefit
73+
from understanding some basics. [Docker Curriculum](https://docker-curriculum.com)
7374
is an excellent tutorial for beginners that is straightforward to work through (Sections 1 - 2.5 are plenty sufficient).
7475

7576
#### **Is it possible to modify the simulation without having to run `build.sh`?**
7677

77-
Yes, but it is marginally more complex. The easiest way is to modify anything in the docker container once you are inside of it - it will work just like a bash shell. If you want to modify any code in the container, you'll need to use an editor that runs in the terminal, like nano. Once you've modified something in the container, you don't need to re-build. However, if you run `stop.sh` once you exit, those changes will be gone.
78+
Yes, but it is marginally more complex. The easiest way is to modify anything in the Docker container once you are inside of it - it will work just like a bash shell. If you want to modify any code in the container, you'll need to use an editor that runs in the terminal, like nano. Once you've modified something in the container, you don't need to re-build. However, if you run `stop.sh` once you exit, those changes will be gone.
7879

7980
#### **How do I access more data than what is already output?**
8081

81-
The simulation by default outputs only a few figures and movies to your home system (that is, outside of the docker container). If you want to access the entire output of the simulation, you will need to copy it from the docker container.
82+
The simulation by default outputs only a few figures and movies to your home system (that is, outside of the Docker container). If you want to access the entire output of the simulation, you will need to copy it from the Docker container.
8283

8384
For example, say you want to extract the worm motion data. This is contained in the file `worm_motion_log.txt`, which is found in the `/home/ow/sibernetic/simulations/[SPECIFIC_TIMESTAMPED_DIRECTORY]/worm_motion_log.txt`. The directory `[SPECIFIC_TIMESTAMPED_DIRECTORY]` will have a name like `C2_FW_2018_02-12_18-36-32`, and its name can be found by checking the `output` directory. This is actually the main output directory for the simulation, and contains all output, including cell modelling and worm movement.
8485

8586
Once the simulation ends and you exit the container with `exit`, but before you run `stop.sh`, run the following command from the openworm-docker-master folder:
8687

8788
`docker cp openworm:/home/ow/sibernetic/simulations/[SPECIFIC_TIMESTAMPED_DIRECTORY]/worm_motion_log.txt ./worm_motion_log.txt`
8889

89-
This will copy the file from the docker container, whose default name is `openworm`. **It is crucial that you do not run `stop.sh` before trying to get your data out (see below)**
90+
This will copy the file from the Docker container, whose default name is `openworm`. **It is crucial that you do not run `stop.sh` before trying to get your data out (see below)**
9091

9192
#### **What is the difference between `exit` and `stop.sh`?**
9293

9394
When you are in the Docker Container `openworm`, and are done interacting with it, you type `exit` to return to your system's shell. This stops execution of anything in the container, and that container's status is now `Exited`. If you try to re-start the process using `run-shell-only.sh`, you will get an error saying that the container already exists. You can choose, at this point, to run `stop.sh`. Doing so will remove the container and any files associated with it, allowing you to run a new simulation. However, if you don't want to remove that container, you will instead want to re-enter it.
9495

9596
#### **How do I enter a container I just exited?**
9697

97-
If you run `stop.sh` you'll delete your data and reset the container for a new run. If, however, you don't want to do that, you can re-enter the docker container like this:
98+
If you run `stop.sh` you'll delete your data and reset the container for a new run. If, however, you don't want to do that, you can re-enter the Docker container like this:
9899

99-
sudo docker exec -it openworm bash
100+
docker start openworm # Restarts the container
101+
docker exec -it openworm /bin/bash # Runs bash inside the container
100102

101-
You'll need to enter your su password. This tells docker to all you to *execute* commands (`exec`) with an *interactive, tty* (`-it`) bash (`bash`) shell in the container `openworm`.
103+
This tells Docker to start the container, to *execute* commands (`exec`) with an *interactive, tty* (`-it`) bash (`bash`) shell in the container `openworm`.
102104

103105
You'll be able to interact with the container as before.
104106

@@ -107,5 +109,4 @@ Documentation
107109
Find out more about OpenWorm. Documentation is available at [http://docs.openworm.org](http://docs.openworm.org). [Join us on Slack](http://bit.ly/OpenWormVolunteer).
108110

109111
This repository references:
110-
* A project-wide [Kanban board of all issues](https://waffle.io/openworm/openworm)
111112
* Project-wide tracking via high-level [issues](https://github.com/openworm/OpenWorm/issues?labels=&milestone=&page=1&state=open) and [milestones](https://github.com/openworm/OpenWorm/milestones)

0 commit comments

Comments
 (0)