From 55a972c0102ec385e2cf731b10ba6bf3b78c29d0 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Tue, 16 Jul 2024 11:36:27 +0200 Subject: [PATCH] Add NEST v3.8_rc1 (#234) * Merge build and deploy to fix deploy problems * Add nest-server requirements * Fix nest-desktop and compose file * Add v3.7 * Remove test * Add v3.7 to readme * Fix nestml version and add pygsl * Add NEST v3.8 * Deactivate Base images, not needed since 3.7 * Deploy rc1 version --- README.md | 27 +++--- ci-templates/000_3.6.gitlab-ci.yml | 2 +- ci-templates/000_3.7.gitlab-ci.yml | 2 +- ci-templates/000_3.8.gitlab-ci.yml | 25 +++++ ci-templates/000_dev.gitlab-ci.yml | 2 +- ci-templates/001_base.gitlab-ci.yml | 2 + ci-templates/003_2.20.2.gitlab-ci.yml | 4 +- docker-compose.yml | 8 +- run.sh | 16 ++-- src/3.8/Dockerfile | 131 ++++++++++++++++++++++++++ src/3.8/entrypoint.sh | 60 ++++++++++++ src/3.8/test-nest.sh | 13 +++ 12 files changed, 263 insertions(+), 29 deletions(-) create mode 100644 ci-templates/000_3.8.gitlab-ci.yml create mode 100644 src/3.8/Dockerfile create mode 100644 src/3.8/entrypoint.sh create mode 100644 src/3.8/test-nest.sh diff --git a/README.md b/README.md index 0d0df63..3e9db26 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Currently the following docker images are provided - nest/nest-simulator:3.5 - nest/nest-simulator:3.6 - nest/nest-simulator:3.7 + - nest/nest-simulator:3.8 ## Usage @@ -23,7 +24,7 @@ You can use the docker images direct out of docker-registry.ebrains.eu like this docker pull nest/nest-simulator:TAG -TAG is '2.20.2', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7' or 'dev'. +TAG is '2.20.2', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', '3.8'or 'dev'. #### NEST 2.20.2 @@ -37,7 +38,7 @@ Jupyter lab with NEST 2.20.2 docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` -v $(pwd):/opt/data -e NEST_CONTAINER_MODE=jupyterlab \ -p 8080:8080 nest/nest-simulator:2.20.2 -#### NEST 3.7 +#### NEST 3.8 To use 'docker-compose' you need the definition file from the git repository. Download it: @@ -50,7 +51,7 @@ To use 'docker-compose' you need the definition file from the git repository. Do or docker run -it --rm -e NEST_CONTAINER_MODE=nest-server -p 52425:52425 \ - nest/nest-simulator:3.7 + nest/nest-simulator:3.8 Starts the NEST API server container and opens the corresponding port 52425. Test it with `curl localhost:52425/api`. @@ -61,9 +62,9 @@ To use 'docker-compose' you need the definition file from the git repository. Do or docker run -it --rm -e NEST_CONTAINER_MODE=nest-server -p 52425:52425 \ - nest/nest-simulator:3.7 + nest/nest-simulator:3.8 docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` -p 54286:54286 \ - -e NEST_CONTAINER_MODE=nest-desktop nest/nest-simulator:3.7 + -e NEST_CONTAINER_MODE=nest-desktop nest/nest-simulator:3.8 Starts the NEST server and the NEST desktop web interface. Port 54286 is also made available. Open in the web browser: `http://localhost:54286` @@ -75,9 +76,9 @@ To use 'docker-compose' you need the definition file from the git repository. Do or docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` -v $(pwd):/opt/data -e NEST_CONTAINER_MODE=notebook \ - -p 8080:8080 nest/nest-simulator:3.7 + -p 8080:8080 nest/nest-simulator:3.8 - Starts a notebook server with pre-installed NEST 3.7. The corresponding URL is displayed in the console. + Starts a notebook server with pre-installed NEST 3.8. The corresponding URL is displayed in the console. - Jupyter lab with NEST @@ -86,9 +87,9 @@ To use 'docker-compose' you need the definition file from the git repository. Do or docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` -v $(pwd):/opt/data -e NEST_CONTAINER_MODE=jupyterlab \ - -p 8080:8080 nest/nest-simulator:3.7 + -p 8080:8080 nest/nest-simulator:3.8 - Starts a jupyter lab server with pre-installed NEST 3.7. The corresponding URL is displayed in the console. + Starts a jupyter lab server with pre-installed NEST 3.8. The corresponding URL is displayed in the console. To stop and delete running containers use `docker-compose down`. @@ -129,7 +130,7 @@ You can clone this repository and use the shell script: [] can be either 'notebook', 'jupyterlab', or 'interactice'. [] kind of docker image (e.g. 'dev', '2.12.0', '2.14.0', '2.16.0', '2.18.0', '3.0', '3.1', '3.2', '3.3', '3.4', '3.5', - '3.6', '3.7' or 'all'). + '3.6', '3.7', '3.8' or 'all'). Example: sh run.sh provision dev sh run.sh run notebook dev @@ -138,7 +139,7 @@ You can clone this repository and use the shell script: ## 1 - 2 (- 3) -In the next steps, VERSION is the kind of docker image you want to use (3.7, dev, ...) +In the next steps, VERSION is the kind of docker image you want to use (3.8, dev, ...) Two little steps to get started @@ -191,7 +192,7 @@ In the folder with your music scripts run: docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` \ -v $(pwd):/opt/data \ - nest/nest-simulator:3.7 /bin/bash + nest/nest-simulator:3.8 /bin/bash You are now on container's shell. @@ -206,7 +207,7 @@ You are now on container's shell. - Export a docker image - docker save nest/nest-simulator:3.5 | gzip -c > nest-docker.tar.gz + docker save nest/nest-simulator:3.8 | gzip -c > nest-docker.tar.gz - Import a docker image diff --git a/ci-templates/000_3.6.gitlab-ci.yml b/ci-templates/000_3.6.gitlab-ci.yml index f27929e..0d44239 100644 --- a/ci-templates/000_3.6.gitlab-ci.yml +++ b/ci-templates/000_3.6.gitlab-ci.yml @@ -6,7 +6,7 @@ Build_36: stage: build needs: ["Build_Base"] rules: - - when: always + - when: never script: # Build - docker pull nest/nest-simulator:3.6 || true diff --git a/ci-templates/000_3.7.gitlab-ci.yml b/ci-templates/000_3.7.gitlab-ci.yml index 0787e97..d8a05a0 100644 --- a/ci-templates/000_3.7.gitlab-ci.yml +++ b/ci-templates/000_3.7.gitlab-ci.yml @@ -9,7 +9,7 @@ Build_3.7: - when: always script: # Build - - docker pull push nest/nest-simulator:3.7 || true + - docker pull nest/nest-simulator:3.7 || true - docker build --cache-from nest/nest-simulator:3.7 --tag nest/nest-simulator:3.7 diff --git a/ci-templates/000_3.8.gitlab-ci.yml b/ci-templates/000_3.8.gitlab-ci.yml new file mode 100644 index 0000000..d65cb83 --- /dev/null +++ b/ci-templates/000_3.8.gitlab-ci.yml @@ -0,0 +1,25 @@ +############################################### +### 3.8 ### +############################################### + + +Build_3.8: + stage: build + rules: + - when: always + script: + # Build + - docker pull nest/nest-simulator:3.8 || true + - docker build + --cache-from nest/nest-simulator:3.8 + --tag nest/nest-simulator:3.8_rc1 + ./src/3.8 + # Test + #- docker run -i --rm nest/nest-simulator:3.8bash /opt/test-nest.sh + # Deploy + - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin + - docker push nest/nest-simulator:3.8_rc1 + - docker logout $DOCKERHUB_REGISTRY + tags: + - shell-runner + diff --git a/ci-templates/000_dev.gitlab-ci.yml b/ci-templates/000_dev.gitlab-ci.yml index 96afc7f..57f24e8 100644 --- a/ci-templates/000_dev.gitlab-ci.yml +++ b/ci-templates/000_dev.gitlab-ci.yml @@ -8,7 +8,7 @@ Build_Dev: - when: always script: # Build - - docker pull push nest/nest-simulator:dev || true + - docker pull nest/nest-simulator:dev || true - docker build --cache-from nest/nest-simulator:dev --tag nest/nest-simulator:dev diff --git a/ci-templates/001_base.gitlab-ci.yml b/ci-templates/001_base.gitlab-ci.yml index 5d47982..f358e47 100644 --- a/ci-templates/001_base.gitlab-ci.yml +++ b/ci-templates/001_base.gitlab-ci.yml @@ -4,6 +4,8 @@ Build_Base: stage: build + rules: + - when: never script: - docker pull $DOCKER_REGISTRY_IMAGE:nest-simulator-build-base || true - docker pull $DOCKER_REGISTRY_IMAGE:nest-simulator-deploy-base || true diff --git a/ci-templates/003_2.20.2.gitlab-ci.yml b/ci-templates/003_2.20.2.gitlab-ci.yml index 9ecbb8b..bb5c1ef 100644 --- a/ci-templates/003_2.20.2.gitlab-ci.yml +++ b/ci-templates/003_2.20.2.gitlab-ci.yml @@ -18,8 +18,8 @@ Build_2202: # Deploy - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:2.20.2 - - docker tag nest/nest-simulator:2.20.2 $DOCKER_REGISTRY_IMAGE:2.20.2 - - docker push $DOCKER_REGISTRY_IMAGE:2.20.2 + #- docker tag nest/nest-simulator:2.20.2 $DOCKER_REGISTRY_IMAGE:2.20.2 + #- docker push $DOCKER_REGISTRY_IMAGE:2.20.2 - docker logout $DOCKERHUB_REGISTRY - docker logout $DOCKER_REGISTRY tags: diff --git a/docker-compose.yml b/docker-compose.yml index 1342de2..1c5c9a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: nest-server: - image: nest/nest-simulator:3.7 + image: nest/nest-simulator:3.8 environment: LOCAL_USER_ID: "`id -u $USER`" NEST_CONTAINER_MODE: "nest-server" @@ -10,7 +10,7 @@ services: - "52425:52425" nest-desktop: - image: nest/nest-simulator:3.7 + image: nest/nest-simulator:3.8 environment: LOCAL_USER_ID: "`id -u $USER`" NEST_CONTAINER_MODE: "nest-desktop" @@ -20,7 +20,7 @@ services: - nest-server nest-notebook: - image: nest/nest-simulator:3.7 + image: nest/nest-simulator:3.8 volumes: - .:/opt/data environment: @@ -30,7 +30,7 @@ services: - "8080:8080" nest-jupyterlab: - image: nest/nest-simulator:3.7 + image: nest/nest-simulator:3.8 volumes: - .:/opt/data environment: diff --git a/run.sh b/run.sh index f208944..a575070 100755 --- a/run.sh +++ b/run.sh @@ -50,11 +50,12 @@ case $command in echo echo "Provisioning needs an argument: 'dev' 'latest_daint' '2.12.0', '2.14.0', '2.14.2'," - echo "'2.16.0', '2.18.0', '2.20.0', '2.20.1', '2.20.2', '3.0','3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7','all' or 'base'." + echo "'2.16.0', '2.18.0', '2.20.0', '2.20.1', '2.20.2', '3.0','3.1', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7', " + echo "'3.8', 'all' or 'base'." echo while test $# -gt 0; do case "$1" in - dev | latest_daint | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 ) + dev | latest_daint | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 | 3.8 ) echo "Build the NEST image for NEST $1" echo docker build -t nest/nest-simulator:"$1" ./src/"$1" @@ -73,7 +74,7 @@ case $command in all) echo "Build the NEST image for NEST 2.12.0, 2.14.0, 2.14.2" echo "2.16.0, 2.18.0, 2.20.0, 2.20.1, 2.20.2, 3.0, 3.1, 3.2," - echo "3.3, 3.4, 3.5, 3.6, 3.7, dev and latest_daint" + echo "3.3, 3.4, 3.5, 3.6, 3.7, 3.8, dev and latest_daint" echo docker build -t nest/nest-simulator:2.12.0 ./src/2.12.0 docker build -t nest/nest-simulator:2.14.0 ./src/2.14.0 @@ -91,6 +92,7 @@ case $command in docker build -t nest/nest-simulator:3.5 ./src/3.5 docker build -t nest/nest-simulator:3.6 ./src/3.6 docker build -t nest/nest-simulator:3.7 ./src/3.7 + docker build -t nest/nest-simulator:3.7 ./src/3.8 docker build -t nest/nest-simulator:dev ./src/dev docker build -t nest/nest-simulator:latest_daint ./src/latest_daint echo @@ -114,14 +116,14 @@ case $command in echo echo "VERSION is the version of NEST" echo "(e.g. dev, 2.12.0, 2.14.0, 2.14.2, 2.16.0, 2.18.0, 2.20.0," - echo "2.20.1, 2.20.2, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7)" + echo "2.20.1, 2.20.2, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8)" echo LOCALDIR="$(pwd)" while test $# -gt 1; do case "$1" in notebook) case "$2" in - dev | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 ) + dev | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 | 3.8 ) echo "Run NEST-$2 with Jupyter Notebook". echo docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` --name my_app \ @@ -137,7 +139,7 @@ case $command in ;; jupyterlab) case "$2" in - dev | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 ) + dev | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 | 3.8 ) echo docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` --name my_app \ -v $(pwd):/opt/data -e NEST_CONTAINER_MODE=jupyterlab \ @@ -152,7 +154,7 @@ case $command in ;; interactive) case "$2" in - dev | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 ) + dev | 2.12.0 | 2.14.0 | 2.14.2 | 2.16.0 | 2.18.0 | 2.20.0 | 2.20.1 | 2.20.2 | 3.0 | 3.1 | 3.2 | 3.3 | 3.4 | 3.5 | 3.6 | 3.7 | 3.8 ) echo "Run NEST-$2 in interactive mode." echo docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` --name my_app -e NEST_CONTAINER_MODE=interactive \ diff --git a/src/3.8/Dockerfile b/src/3.8/Dockerfile new file mode 100644 index 0000000..e3e237e --- /dev/null +++ b/src/3.8/Dockerfile @@ -0,0 +1,131 @@ +FROM ubuntu:22.04 +LABEL maintainer="s.graber@fz-juelich.de" + +ARG NEST_VERSION=3.8_rc1 +ARG SRC_PATH=/tmp +ARG CMAKE_C_COMPILER_LAUNCHER=ccache +ARG CMAKE_CXX_COMPILER_LAUNCHER=ccache +ARG CXX_FLAGS="-pedantic -Wextra -Wno-unknown-pragmas -D_GLIBCXX_ASSERTIONS" + +ENV TERM=xterm \ + TZ=Europe/Berlin \ + DEBIAN_FRONTEND=noninteractive \ + PATH=/root/.local/bin:${PATH} + +RUN apt-get update && apt-get install -y --no-install-recommends \ + automake \ + autotools-dev \ + build-essential \ + ccache \ + cmake \ + curl \ + cython3 \ + freeglut3-dev \ + git \ + gosu \ + jq \ + junitparser \ + less \ + libboost-filesystem-dev libboost-regex-dev libboost-wave-dev \ + libboost-python-dev libboost-program-options-dev libboost-test-dev \ + libboost-dev \ + libgomp1 \ + libgsl-dev \ + libgsl0-dev \ + libhdf5-dev \ + libltdl-dev \ + libltdl7 \ + libmusic1v5 \ + libncurses-dev \ + libomp-dev \ + libopenmpi-dev \ + libpcre3 \ + libpcre3-dev \ + libpython3.10 \ + libreadline-dev \ + libreadline8 \ + libtool \ + libzmq3-dev \ + llvm-dev \ + nano \ + openmpi-bin \ + openssh-client \ + openssh-server \ + pandoc \ + pep8 \ + pkg-config \ + python3-dev \ + python3-flask \ + python3-flask-cors \ + python3-h5py \ + python3-ipython \ + python3-junitparser \ + python3-jupyter-core \ + python3-mpi4py \ + python3-nose \ + python3-pandas \ + python3-path \ + python3-pip \ + python3-pytest \ + python3-pytest-timeout \ + python3-pytest-xdist \ + python3-restrictedpython \ + python3-scipy \ + python3-setuptools \ + python3-sphinx \ + python3-statsmodels \ + python3-sympy \ + python3-tk \ + python3-tqdm \ + tcl8.6 \ + tcl8.6-dev \ + tk8.6-dev \ + uwsgi \ + vera++ \ + wget && \ + apt-get autoremove && \ + python3 -m pip install --upgrade pip setuptools wheel mock && \ + python3 -m pip install --force-reinstall --upgrade --no-binary=h5py h5py && \ + ldconfig && \ + cd ${SRC_PATH} && \ + wget "https://github.com/nest/nest-simulator/archive/refs/tags/v${NEST_VERSION}.tar.gz" -P ${SRC_PATH} && \ + tar -xzf v${NEST_VERSION}.tar.gz && \ + python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/doc/requirements.txt && \ + python3 -m pip install sphinx_gallery==0.10.1 'numpy<=1.26' && \ + chmod +x ${SRC_PATH}/nest-simulator-${NEST_VERSION}/build_support/install_music.sh && \ + ${SRC_PATH}/nest-simulator-${NEST_VERSION}/build_support/install_music.sh && \ + mkdir ${SRC_PATH}/nest-build && cd $_ && \ + cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/nest \ + -Dwith-optimize="-O2" \ + -Dwith-warning=ON \ + -Dwith-userdoc=ON \ + -Dwith-boost=ON \ + -Dwith-ltdl=ON \ + -Dwith-gsl=ON \ + -Dwith-readline=ON \ + -Dwith-python=ON \ + -Dwith-mpi=ON \ + -Dwith-openmp=ON \ + -Dwith-libneurosim=OFF \ + -Dwith-sionlib=OFF \ + -Dwith-music='$HOME/.cache/libneurosim.install' \ + -Dwith-hdf5=ON \ + ${SRC_PATH}/nest-simulator-${NEST_VERSION} && \ + make && \ + make install && \ + python3 -m pip install --upgrade pip setuptools wheel && \ + python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements.txt && \ + python3 -m pip install --upgrade nest-desktop && \ + python3 -m pip install --upgrade scipy && \ + python3 -m pip install --upgrade gsl wheel setuptools swig && \ + python3 -m pip install NESTML==8.0.0rc1 && \ + python3 -m pip install --upgrade pygsl@git+https://github.com/pygsl/pygsl@v2.3.3 + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod +x /usr/local/bin/entrypoint.sh + +COPY test-nest.sh /opt/test-nest.sh +RUN chmod +x /opt/test-nest.sh + +EXPOSE 8080 52425 54286 +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/src/3.8/entrypoint.sh b/src/3.8/entrypoint.sh new file mode 100644 index 0000000..de46708 --- /dev/null +++ b/src/3.8/entrypoint.sh @@ -0,0 +1,60 @@ +#!/bin/bash +set -e +IP_ADDRESS=$(hostname --ip-address) + +# NEST environment +source /opt/nest/bin/nest_vars.sh + +# Running NEST to test and to copy the .nestrc into /home/nest +nest --help + +export MUSIC_ROOT_DIR='$HOME/.cache/music.install' +export MUSIC_ROOT=${MUSIC_ROOT_DIR} +MUSIC_PATH=${MUSIC_ROOT_DIR} +export LD_LIBRARY_PATH=${MUSIC_PATH}/lib:$LD_LIBRARY_PATH +export PATH=${MUSIC_PATH}/bin:$PATH +export CPATH=${MUSIC_PATH}/include:$CPATH +export PYTHONPATH=${MUSIC_PATH}/lib/python3.8/site-packages:$PYTHONPATH + +MODE="${NEST_CONTAINER_MODE:-$1}" +if [[ "${MODE}" = 'interactive' ]]; then + read -p "Your python script: " name + echo Starting: $name + # Start + mkdir -p /opt/data; cd /opt/data + exec python3 /opt/data/$name + +elif [[ "${MODE}" = 'jupyterlab' ]]; then + mkdir -p /opt/data; cd /opt/data + exec /usr/local/bin/jupyter-lab --ip="${IP_ADDRESS}" --port=8080 --no-browser --allow-root + +elif [[ "${MODE}" = 'nest-desktop' ]]; then + export NEST_DESKTOP_HOST="${NEST_DESKTOP_HOST:-0.0.0.0}" + export NEST_DESKTOP_PORT="${NEST_DESKTOP_PORT:-54286}" + exec nest-desktop start + +elif [[ "${MODE}" = 'nest-server' ]]; then + export NEST_SERVER_HOST="${NEST_SERVER_HOST:-0.0.0.0}" + export NEST_SERVER_PORT="${NEST_SERVER_PORT:-52425}" + export NEST_SERVER_STDOUT="${NEST_SERVER_STDOUT:-1}" + + export NEST_SERVER_ACCESS_TOKEN="${NEST_SERVER_ACCESS_TOKEN}" + export NEST_SERVER_CORS_ORIGINS="${NEST_SERVER_CORS_ORIGINS:-http://localhost:*}" + export NEST_SERVER_DISABLE_AUTH="${NEST_SERVER_DISABLE_AUTH:-1}" + export NEST_SERVER_DISABLE_RESTRICTION="${NEST_SERVER_DISABLE_RESTRICTION:-1}" + export NEST_SERVER_ENABLE_EXEC_CALL="${NEST_SERVER_ENABLE_EXEC_CALL:-1}" + export NEST_SERVER_MODULES="${NEST_SERVER_MODULES:-import nest; import numpy; import numpy as np}" + exec nest-server start + +elif [[ "${MODE}" = 'nest-server-mpi' ]]; then + export NEST_SERVER_HOST="${NEST_SERVER_HOST:-0.0.0.0}" + export NEST_SERVER_PORT="${NEST_SERVER_PORT:-52425}" + exec mpirun -np "${NEST_SERVER_MPI_NUM:-1}" nest-server-mpi + +elif [[ "${MODE}" = 'notebook' ]]; then + mkdir -p /opt/data; cd /opt/data + exec /usr/local/bin/jupyter-notebook --ip="${IP_ADDRESS}" --port=8080 --no-browser --allow-root + +else + exec "$@" +fi diff --git a/src/3.8/test-nest.sh b/src/3.8/test-nest.sh new file mode 100644 index 0000000..d73492a --- /dev/null +++ b/src/3.8/test-nest.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# run mpiexec as root +export OMPI_ALLOW_RUN_AS_ROOT=1 +export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 + +# install what is needed +pip3 install pytest-xdist pytest-timeout junitparser + +HDF5_DISABLE_VERSION_CHECK=1 + +cd /opt/nest/share/nest/testsuite/ +bash do_tests.sh --prefix=/opt/nest --with-python=/usr/bin/python