Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/docker-image-quickrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ jobs:
ls -alth
ls -alth output
ls -alth output/*

find output/Siber*/cut*mp4 -maxdepth 1 -size +200k | grep -q . # Fails if not found or too small
3 changes: 3 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ jobs:
ls -alth output/*

more output/*/report.json

find output/C2_FW*/cut*mp4 -maxdepth 1 -size +300k | grep -q . # Fails if not found or too small

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ output/C2*
/output/siminfo.py
/output/wor*
/output/Sibernetic_*
/output/W2D*
/output/alone*
/output/cube*
/output/deep*
/output/master*
46 changes: 25 additions & 21 deletions Dockerfile_intel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

LABEL maintainer="David Lung (lungdm@gmail.com); Padraig Gleeson (p.gleeson@gmail.com)"

Expand All @@ -18,72 +18,76 @@ RUN mkdir -p /etc/sudoers.d && \
chmod 0440 /etc/sudoers.d/$USER && \
chown ${uid}:${gid} -R /home/$USER

ENV DEBIAN_FRONTEND noninteractive # TODO: change
ENV DEBIAN_FRONTEND=noninteractive


################################################################################
######## Update/install essential libraries

RUN apt-get update && apt-get install -y --no-install-recommends apt-utils \
RUN apt-get update
RUN apt-get install -y --no-install-recommends apt-utils \
wget nano htop build-essential make git automake autoconf \
g++ rpm libtool libncurses5-dev zlib1g-dev bison flex lsb-core \
g++ rpm libtool libncurses5-dev zlib1g-dev bison flex \
sudo xorg openbox x11-xserver-utils \
libxext-dev libncurses-dev python3-dev mercurial \
freeglut3-dev libglu1-mesa-dev libglew-dev python3-dev python3-pip python3-lxml python3-scipy python3-tk \
libxext-dev libncurses-dev mercurial \
freeglut3-dev libglu1-mesa-dev libglew-dev python3-dev python3-pip \
kmod dkms linux-source linux-headers-generic \
maven openjdk-8-jdk \
python3-setuptools python3-yaml libnuma1 \
libnuma1 \
openmpi-bin libopenmpi-dev \
libgl1-mesa-glx libgl1-mesa-dri libfreetype6-dev \
libxft-dev python3-matplotlib unzip ffmpeg xvfb tmux
libgl1 libglx-mesa0 libgl1-mesa-dri libfreetype6-dev \
libxft-dev unzip ffmpeg xvfb tmux

#RUN sudo pip install --upgrade pip

RUN sudo usermod -a -G video $USER

#USER $USER
ENV HOME /home/$USER
ENV HOME=/home/$USER
WORKDIR $HOME

#### TODO: check that this is the best way to switch to py3...
RUN sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
RUN sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10


################################################################################
######## Install NEURON simulator

RUN pip3 install neuron==8.2.6
RUN sudo pip install neuron==8.2.6 --break-system-packages


################################################################################
######## Install c302 for building neuronal network models

RUN git clone https://github.com/openworm/c302.git && \
cd c302 && \
git checkout ow-0.9.5 && \
sudo pip install .
git checkout ow-0.9.7 && \
sudo pip install . --break-system-packages

# Note: pyNeuroML installed with the above library

RUN pip3 install owmeta-core==0.13.5
RUN owm bundle remote --user add ow 'https://raw.githubusercontent.com/openworm/owmeta-bundles/master/index.json'


################################################################################
######## Install Sibernetic for the worm body model

RUN git clone https://github.com/openworm/sibernetic.git && \
cd sibernetic && \
git checkout ow-0.9.5 # fixed to a specific branch
git checkout ow-0.9.7 # fixed to a specific branch


################################################################################
######## Install extra Python dependencies

RUN sudo pip install ruff --break-system-packages


################################################################################
######## Set some paths//environment variables

ENV C302_HOME=$HOME/c302/c302
ENV SIBERNETIC_HOME=$HOME/sibernetic
ENV PYTHONPATH=$PYTHONPATH:$HOME/c302:$SIBERNETIC_HOME
ENV PYTHONPATH=$HOME/c302:$SIBERNETIC_HOME

ENV NEURON_MODULE_OPTIONS=-nogui


################################################################################
Expand Down Expand Up @@ -124,7 +128,7 @@ RUN cd sibernetic && \
COPY ./master_openworm.py $HOME/master_openworm.py
RUN sudo chown $USER:$USER $HOME/master_openworm.py

RUN echo '\n\nalias cd..="cd .."\nalias h=history\nalias ll="ls -alt"' >> ~/.bashrc
RUN printf '\n\nalias cd..="cd .."\nalias h=history\nalias ll="ls -alth"\n' >> ~/.bashrc

RUN pip list

Expand Down
5 changes: 3 additions & 2 deletions run-quick.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -ex

#from: https://unix.stackexchange.com/a/129401
while getopts ":d:p:" opt; do
Expand All @@ -16,7 +17,7 @@ OW_OUT_DIR=/home/ow/shared
HOST_OUT_DIR=$PWD
version=$(<VERSION) # Read version of Dockerfile from file VERSION

xhost +
# xhost + # remove for now...


NOC302_PART="-e NOC302=1"
Expand All @@ -33,6 +34,6 @@ $DURATION_PART \
--privileged \
-v $HOST_OUT_DIR:$OW_OUT_DIR:rw \
openworm/openworm:$version \
bash -c "DISPLAY=:44 python master_openworm.py"
bash -c "DISPLAY=:44 python3 master_openworm.py"

docker logs -f openworm_$version
3 changes: 2 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -ex

#from: https://unix.stackexchange.com/a/129401
while getopts ":d:p:" opt; do
Expand All @@ -17,7 +18,7 @@ HOST_OUT_DIR=$PWD

version=$(<VERSION) # Read version of Dockerfile from file VERSION

xhost +
# xhost + # remove for now...

if [ -z "$duration" ]
then #duration is not set, don't use it
Expand Down