1- FROM ubuntu:18 .04
1+ FROM ubuntu:22 .04
22
33LABEL maintainer=
"David Lung ([email protected] ); Padraig Gleeson ([email protected] )" 44
@@ -36,7 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
3636 wget nano htop build-essential make git automake autoconf \
3737 g++ rpm libtool libncurses5-dev zlib1g-dev bison flex lsb-core \
3838 sudo xorg openbox x11-xserver-utils \
39- libxext-dev libncurses-dev python -dev mercurial \
39+ libxext-dev libncurses-dev python3 -dev mercurial \
4040 freeglut3-dev libglu1-mesa-dev libglew-dev python3-dev python3-pip python3-lxml python3-scipy python3-tk \
4141 kmod dkms linux-source linux-headers-generic \
4242 maven openjdk-8-jdk \
@@ -50,7 +50,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
5050
5151RUN sudo usermod -a -G video $USER
5252
53- USER $USER
53+ # USER $USER
5454ENV HOME /home/$USER
5555WORKDIR $HOME
5656
@@ -62,50 +62,29 @@ RUN sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10
6262# ###############################################################################
6363# ####### Install NEURON simulator
6464
65- RUN sudo pip install neuron==7.8.1
66-
67-
68- # ###############################################################################
69- # ####### Install pyNeuroML for handling NeuroML network model
70-
71- # Pin version of pymongo required for py3.6... TODO remove...
72- RUN sudo pip install pymongo==4.1.1
73-
74- RUN git clone https://github.com/NeuroML/pyNeuroML.git && \
75- cd pyNeuroML && \
76- git checkout master && \
77- sudo python3 setup.py install
78-
79- # TODO remove this line after we have better dependency management. The
80- # current version of gitpython requires python >= 3.7, which is newer than the
81- # python included in the base image. Therefore, we manually install an older
82- # gitpython to be used with OpenWormData.
83- # See https://github.com/openworm/OpenWorm/pull/316
84- RUN sudo pip install 'gitpython==2.1.15' markupsafe
85-
86- RUN git clone https://github.com/openworm/PyOpenWorm.git && \
87- cd PyOpenWorm && \
88- git checkout ow-0.9 && \
89- sudo apt-get install -y python3-cffi && \
90- sudo python3 setup.py install && \
91- pow clone https://github.com/openworm/OpenWormData.git
65+ RUN pip3 install neuron==8.0.1
9266
9367
9468# ###############################################################################
9569# ####### Install c302 for building neuronal network models
9670
9771RUN git clone https://github.com/openworm/c302.git && \
9872 cd c302 && \
99- git checkout ow-0.9.1 && \
100- sudo python3 setup.py install
73+ git checkout ow-0.9.3 && \
74+ sudo pip install .
75+
76+ # Note: pyNeuroML installed with the above library
77+
78+ RUN pip3 install owmeta-core==0.13.5
79+ RUN owm bundle remote --user add ow 'https://raw.githubusercontent.com/openworm/owmeta-bundles/master/index.json'
10180
10281
10382# ###############################################################################
10483# ####### Install Sibernetic for the worm body model
10584
10685RUN git clone https://github.com/openworm/sibernetic.git && \
10786 cd sibernetic && \
108- git checkout ow-0.9.1 # fixed to a specific branch
87+ git checkout ow-0.9.3 # fixed to a specific branch
10988
11089RUN cp c302/pyopenworm.conf sibernetic/ # Temp step until PyOpenWorm can be run from any dir...
11190
@@ -120,10 +99,6 @@ ENV C302_HOME=$HOME/c302/c302
12099ENV SIBERNETIC_HOME=$HOME/sibernetic
121100ENV PYTHONPATH=$PYTHONPATH:$HOME/c302:$SIBERNETIC_HOME
122101
123- # Not working with --chown=$USER:$USER
124- COPY ./master_openworm.py $HOME/master_openworm.py
125- RUN sudo chown $USER:$USER $HOME/master_openworm.py
126-
127102
128103# ###############################################################################
129104# ####### Install Intel OpenCL libraries needed for Sibernetic
@@ -150,25 +125,16 @@ sudo apt install -y ocl-icd-opencl-dev vim
150125# ####### Build Sibernetic
151126
152127RUN cd sibernetic && \
153- sed -i -e "s/lpython2.7/lpython3.6m/g" makefile && \
154- sed -i -e "s/n2.7/n3.6/g" makefile && \
128+ sed -i -e "s/n2.7/n3.10/g" makefile && \
155129 make clean && make all # Use python 3 libs
156130
157- # intel i5, hd 5500, linux 4.15.0-39-generic
158- # ./Release/Sibernetic -f worm -no_g device=CPU 190ms
159- # ./Release/Sibernetic -f worm -no_g device=GPU 150ms (initialization takes some time)
160-
161- # Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz, linux 4.4.0-139-generic
162- # ./Release/Sibernetic -f worm -no_g device=CPU 60ms
163- #
164- # after installing the nvidia driver used in host:
165- # # wget http://us.download.nvidia.com/tesla/390.30/nvidia-diag-driver-local-repo-ubuntu1604-390.30_1.0-1_amd64.deb
166- # # sudo dpkg -i nvidia-diag-driver-local-repo-ubuntu1604-390.30_1.0-1_amd64.deb
167- # # sudo apt-key add /var/nvidia-diag-driver-local-repo-390.30/7fa2af80.pub
168- # # sudo apt-get update
169- # # sudo apt-get install -y cuda-drivers
170- # ./Release/Sibernetic -f worm -no_g device=GPU 37ms
171131
132+ # ###############################################################################
133+ # ####### Copy master python script
134+
135+ # Not working with --chown=$USER:$USER
136+ COPY ./master_openworm.py $HOME/master_openworm.py
137+ RUN sudo chown $USER:$USER $HOME/master_openworm.py
172138
173139RUN echo '\n\n alias cd..="cd .."\n alias h=history\n alias ll="ls -alt"' >> ~/.bashrc
174140
0 commit comments