Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e29a775
auto-detect arm platform in build.sh
tijszwinkels Jul 5, 2024
0f68b03
Add exp branch
pgleeson Aug 15, 2024
259750b
Merge pull request #355 from tijszwinkels/detect-arm
pgleeson Aug 15, 2024
c11c5b1
Add the jupyterlab for compatibility with binder
Sep 21, 2024
dc7afef
Merge pull request #358 from tomichec/287-mybinder
pgleeson Oct 4, 2024
42d80bc
Merge branch 'development' into test_jupyterlab2
pgleeson Oct 4, 2024
e878e3d
Merge branch 'patch-1' of github.com:pikid/OpenWorm into pikid-patch-1
pgleeson Oct 4, 2024
9516673
Merge branch 'pikid-patch-1' into test_jupyterlab2
pgleeson Oct 4, 2024
1abda59
Merge branch 'experimental' into test_jupyterlab2
pgleeson Oct 4, 2024
d36a9fe
Arch check in rebuild also
pgleeson Oct 5, 2024
4e6e757
Initial jupyterlab run script
pgleeson Oct 5, 2024
b6ffffe
Copy out positions buffer also
pgleeson Oct 10, 2024
36a80c3
Merge branch 'master' into experimental
pgleeson Jun 6, 2025
724761f
Merge branch 'development' into experimental
pgleeson Jul 31, 2025
5a569e2
Better jupyterlab install
pgleeson Jul 31, 2025
715de9f
Tidying up image
pgleeson Jul 31, 2025
3a9e7a2
Improves the master_openworm script - makes it more realsitic about w…
pgleeson Aug 8, 2025
2b19881
Improve options o run.sh, able to pass a configuration, e.g. ./run.sh…
pgleeson Aug 8, 2025
551d12c
Use default worm_crawl_half_resolution
pgleeson Aug 8, 2025
cd45918
Improved test
pgleeson Aug 8, 2025
1adf562
Merge branch 'development' into experimental
pgleeson Nov 14, 2025
6492775
Some of the changes from experimental
pgleeson Nov 28, 2025
9468e9c
Temp: run a longer sim...
pgleeson Nov 28, 2025
2dea247
Just copy position files out
pgleeson Nov 28, 2025
2cf0ac4
Allow no c302 option to be passed with: -n
pgleeson Dec 1, 2025
b753a5a
Merge branch 'test_all' into experimental
pgleeson Dec 1, 2025
3fcb10e
Changes from experimental
pgleeson Dec 4, 2025
9e97618
Tweak to test runs
pgleeson Dec 4, 2025
446749b
Latest run sh and py
pgleeson Dec 4, 2025
7170d26
Improved run scripts
pgleeson Dec 4, 2025
5049196
Install x11-xserver-utils
pgleeson Dec 4, 2025
de352fb
Better run scripts
pgleeson Dec 4, 2025
06e3b82
Merge branch 'test_all' into experimental
pgleeson Dec 4, 2025
70bfcc3
Merge branch 'experimental' of github.com:openworm/OpenWorm into expe…
pgleeson Dec 4, 2025
94c1a4c
Pass on error code
pgleeson Dec 4, 2025
de7aba8
Better checks on failure
pgleeson Dec 8, 2025
01d3d0b
Update intel docker
pgleeson Dec 8, 2025
cdd360e
Run shorter sim for testing
pgleeson Dec 8, 2025
2c63d33
Improved intel build
pgleeson Dec 8, 2025
c3475e9
Skipping actual run of Intel Docker image, due to segfaults observed …
pgleeson Dec 8, 2025
e924670
Merge branch 'test_all' into experimental
pgleeson Dec 8, 2025
e7b5252
Back to longer test
pgleeson Dec 8, 2025
57a640a
Merge branch 'test_all' into experimental
pgleeson Dec 8, 2025
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
11 changes: 5 additions & 6 deletions .github/workflows/docker-image-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image Build - Intel drivers

on:
push:
branches: [ master, dev*, test* ]
branches: [ master, dev*, test*, experimental ]
pull_request:
branches: [ master, dev*, test* ]
branches: [ master, dev*, test*, experimental ]

jobs:

Expand All @@ -28,11 +28,10 @@ jobs:

- name: Run the Docker image
run: |
./run.sh
echo "Skipping actual run of Intel Docker image, due to segfaults observed on GitHub runners"
#sudo apt-get update && sudo apt-get install -y x11-xserver-utils # for xhost
#./run.sh

- name: Info on generated files
run: |
ls -alth
ls -alth output
ls -alth output/*
more output/*/report.json
5 changes: 3 additions & 2 deletions .github/workflows/docker-image-quickrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image Quick Run

on:
push:
branches: [ master, dev*, test* ]
branches: [ master, dev*, test*, experimental ]
pull_request:
branches: [ master, dev*, test* ]
branches: [ master, dev*, test*, experimental ]

jobs:

Expand All @@ -25,6 +25,7 @@ jobs:
docker images
- name: Run the Docker image
run: |
sudo apt-get update && sudo apt-get install -y x11-xserver-utils # for xhost
./run-quick.sh
- name: Info on generated files
run: |
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image Build and Run

on:
push:
branches: [ master, dev*, test* ]
branches: [ master, dev*, experimental, test* ]
pull_request:
branches: [ master, dev*, test* ]
branches: [ master, dev*, experimental, test* ]

jobs:

Expand All @@ -14,18 +14,33 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Build the Docker image
run: |
chmod a+w output/
ls -alth
./build.sh

- name: Info on Docker images
run: |
docker -v
docker images
- name: Run the Docker image

- name: Run the Docker image with the default falling cube demo from sibernetic
run: |
sudo apt-get update && sudo apt-get install -y x11-xserver-utils # for xhost
./run.sh -d 20 -c demo1

- name: Run the Docker image with a worm simulation - no c302
run: |
./stop.sh
./run.sh -d 10 -n

- name: Run the Docker image with a worm simulation
run: |
./run.sh
./stop.sh
./run.sh -d 150 # temp longer simulation for testing

- name: Info on generated files
run: |
ls -alth
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ output/C2*
/output/siminfo.py
/output/wor*
/output/Sibernetic_*
/output/test*
/output/box
/output/swim*
/output/alone*
/output/cube*
/output/master*
/output/deep_swim*
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ 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 \
sudo xorg openbox x11-xserver-utils \
libxext-dev libncurses-dev mercurial \
libxext-dev libncurses-dev \
freeglut3-dev libglu1-mesa-dev libglew-dev python3-dev python3-pip \
kmod dkms linux-source linux-headers-generic \
maven openjdk-8-jdk \
openjdk-21-jdk \
libnuma1 \
openmpi-bin libopenmpi-dev \
libgl1 libglx-mesa0 libgl1-mesa-dri libfreetype6-dev \
libxft-dev unzip ffmpeg xvfb tmux

Expand Down Expand Up @@ -96,7 +95,8 @@ ENV NEURON_MODULE_OPTIONS=-nogui
RUN wget https://master.dl.sourceforge.net/project/nicehashsgminerv5viptools/APP%20SDK%20A%20Complete%20Development%20Platform/AMD%20APP%20SDK%203.0%20for%2064-bit%20Linux/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 && \
tar -xf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 && \
printf 'Y\n\n' | sudo ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh && \
rm AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
rm AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 && \
rm AMD-APP-SDK-v3.0.130.136-GA-linux64.sh

RUN sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libOpenCL.so.1 /usr/lib/libOpenCL.so.1
RUN sudo ln -s /opt/AMDAPPSDK-3.0/lib/x86_64/sdk/libamdocl64.so /usr/lib/libamdocl64.so
Expand All @@ -116,6 +116,12 @@ RUN cd sibernetic && \
make clean && make all && ldd ./Release/Sibernetic # Use python 3 libs


################################################################################
######## Set up JupyterLab

RUN sudo pip install notebook jupyterlab --break-system-packages


################################################################################
######## Copy master python script

Expand All @@ -125,6 +131,9 @@ RUN sudo chown $USER:$USER $HOME/master_openworm.py

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



RUN pip list

RUN echo "Built the OpenWorm Docker image!"

51 changes: 30 additions & 21 deletions Dockerfile_intel
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

################################################################################
######## Note: main Dockerfile using AMD libraries should be used unless
######## there is a specific reason to use Intel OpenCL libraries
################################################################################

LABEL maintainer="David Lung ([email protected]); Padraig Gleeson ([email protected])"

Expand All @@ -18,72 +23,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 +133,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
12 changes: 11 additions & 1 deletion build_intel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@
# A version of the docker container using the Intel libraries for OpenCL

version=$(<VERSION) # Read version of Dockerfile from file VERSION
docker build --platform linux/amd64 "$@" -t "openworm/openworm:$version" -f Dockerfile_intel .

# Set the platform flag if we're on ARM
arch=$(uname -m)
if [[ "$arch" == "arm64" || "$arch" == "aarch64" ]]; then
platform_flag="--platform linux/amd64"
else
platform_flag=""
fi

# Build the Docker image
docker build $platform_flag "$@" -t "openworm/openworm:$version" -f Dockerfile_intel .
Loading
Loading