diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ae7dcb7..0aa74df 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -53,3 +53,7 @@ jobs: - name: Print info on docker images run: | docker images + + - name: Test a number of repos from OSB + run: | + docker run -t neuralensemble/osb /bin/bash -c "git clone https://github.com/OpenSourceBrain/PyNNShowcase.git && cd PyNNShowcase && omv find && omv all -V" diff --git a/.gitignore b/.gitignore index 9de5576..d78bdec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .idea -/base/generate.sh /simulationx/runLocal.sh /simulationx/regenerateAll.sh /base/runLocal.sh +.DS_Store diff --git a/base/Dockerfile b/base/Dockerfile index 8e90170..76540af 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -3,16 +3,17 @@ # FROM neurodebian:jammy -MAINTAINER andrew.davison@unic.cnrs-gif.fr +LABEL org.opencontainers.image.authors="andrew.davison@unic.cnrs-gif.fr,p.gleeson@gmail.com" +LABEL org.opencontainers.image.description="A base Docker image for Python-based computational neuroscience and neurophysiology" -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive ENV LANG=C.UTF-8 -RUN apt-get update; apt-get install -y automake libtool build-essential openmpi-bin libopenmpi-dev git vim \ - wget python3 libpython3-dev libncurses5-dev libreadline-dev libgsl0-dev cython3 \ - python3-numpy python3-scipy python3-matplotlib python3-jinja2 python3-mock \ - ipython3 python3-httplib2 python3-docutils python3-yaml \ - subversion python3-venv python3-mpi4py python3-tables python3-h5py cmake zlib1g-dev +RUN apt-get update +RUN apt-get install -y automake libtool build-essential openmpi-bin libopenmpi-dev git vim \ + wget python3 libpython3-dev libncurses5-dev libreadline-dev libgsl0-dev \ + ipython3 \ + subversion python3-venv python3-mpi4py cmake zlib1g-dev RUN useradd -ms /bin/bash docker USER docker @@ -26,5 +27,5 @@ ENV VENV=$HOME/env/neurosci RUN python3 -m venv $VENV && python3 -m venv --system-site-packages $VENV RUN $VENV/bin/pip3 install --upgrade pip -RUN $VENV/bin/pip3 install parameters quantities neo django==1.8.19 django-tagging future hgapi gitpython sumatra nixio +RUN $VENV/bin/pip3 install parameters quantities neo django-tagging future hgapi gitpython sumatra nixio RUN $VENV/bin/pip3 install --upgrade nose ipython diff --git a/base/generate.sh b/base/generate.sh new file mode 100755 index 0000000..471140b --- /dev/null +++ b/base/generate.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -ex + + +# 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 + + +docker build $platform_flag -t neuralensemble/base . diff --git a/osb/Dockerfile b/osb/Dockerfile index d8eef63..5cd784d 100644 --- a/osb/Dockerfile +++ b/osb/Dockerfile @@ -9,7 +9,8 @@ #FROM neuralensemble/simulationx:py2_pynn094 # For local testing FROM neuralensemble/simulationx -MAINTAINER p.gleeson@gmail.com +LABEL org.opencontainers.image.authors="andrew.davison@unic.cnrs-gif.fr,p.gleeson@gmail.com" +LABEL org.opencontainers.image.description="A Docker image for running neuronal models from Open Source Brain. This image extends the basic simulationx image by adding support for libraries required for OSB models" USER root @@ -23,9 +24,9 @@ RUN /bin/bash -c "source ~/env/neurosci/bin/activate" #### Set versions # This will set the versions of simulators installed with 'omv install ...' -ENV OMV_VER=v0.3.3 +ENV OMV_VER=v0.3.10 -ENV PYNEUROML_VER=1.3.8 +ENV PYNEUROML_VER=1.3.21 ENV NETPYNE_VER=1.0.6 # omv install arbor with 0.9.0 throwing 'Illegal instruction'..? ENV ARBOR_VER=0.8.1 @@ -38,15 +39,13 @@ RUN $VENV/bin/pip install pyNeuroML==$PYNEUROML_VER # will set versions of libNe # Install OMV +RUN $VENV/bin/pip install scipy tables pythran pandas numexpr --upgrade RUN $VENV/bin/pip install git+https://github.com/OpenSourceBrain/osb-model-validation@${OMV_VER} RUN sed -i -e s/'\/usr\/bin\/python'/'\/home\/docker\/env\/neurosci\/bin\/python'/g $VENV/bin/omv # Install jNeuroML, PyLEMS & NeuroML2 -RUN $VENV/bin/omv install jNeuroML -ENV JNML_HOME=$HOME/jnml/jNeuroMLJar - RUN $VENV/bin/omv install jLEMS ENV LEMS_HOME=$HOME/jLEMS @@ -109,7 +108,6 @@ USER root RUN which python -RUN $VENV/bin/pip install 'numpy<2.0.0' # as there are still some packages not compliant with this # Some aliases diff --git a/osb/generateAll.sh b/osb/generateAll.sh new file mode 100755 index 0000000..c49c61a --- /dev/null +++ b/osb/generateAll.sh @@ -0,0 +1,16 @@ +set -e + +cd ../base +./generate.sh + +cd ../simulation +./generate.sh + +cd ../simulationx + +./generate.sh + +cd ../osb + +./generate.sh + diff --git a/simulation/Dockerfile b/simulation/Dockerfile index ddaa2a2..c820346 100644 --- a/simulation/Dockerfile +++ b/simulation/Dockerfile @@ -3,18 +3,21 @@ # FROM neuralensemble/base -MAINTAINER andrew.davison@unic.cnrs-gif.fr +LABEL org.opencontainers.image.authors="andrew.davison@unic.cnrs-gif.fr,p.gleeson@gmail.com" +LABEL org.opencontainers.image.description="A Docker image for running neuronal network simulations" RUN ln -s /usr/bin/2to3-3.5 $VENV/bin/2to3 #### Set versions -ENV NEST_VER=3.5 -ENV NRN_VER=8.2.2 -ENV BRIAN2_VER=2.5.4 +ENV NEST_VER=3.7 +ENV NRN_VER=8.2.7 +ENV BRIAN2_VER=2.9.0 ENV PYNN_VER=0.11.0 +RUN $VENV/bin/pip install scipy tables pythran pandas numexpr matplotlib --upgrade +RUN $VENV/bin/pip install "cython<3.1.0" #### Install NEST @@ -43,7 +46,7 @@ RUN mkdir $NEST; \ -DPYTHON_LIBRARY=$VENV/lib/libpython3.8.so \ -DPYTHON_INCLUDE_DIR=/usr/include/python3.8 \ $HOME/packages/$NEST; \ - make -j4; make install + make -j7; make install #### Install NEURON diff --git a/simulationx/Dockerfile b/simulationx/Dockerfile index 5044423..96227fb 100644 --- a/simulationx/Dockerfile +++ b/simulationx/Dockerfile @@ -6,7 +6,8 @@ # FROM neuralensemble/simulation -MAINTAINER andrew.davison@unic.cnrs-gif.fr +LABEL org.opencontainers.image.authors="andrew.davison@unic.cnrs-gif.fr,p.gleeson@gmail.com" +LABEL org.opencontainers.image.description="A Docker image for running neuronal network simulations. This image extends the basic simulation image by adding support for SSH access and Xwindows." USER root