Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix v3.6 #229

Merged
merged 12 commits into from
Apr 19, 2024
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ Currently the following docker images are provided
- nest/nest-simulator:3.4
- nest/nest-simulator:3.5
- nest/nest-simulator:3.6
- nest/nest-simulator:3.7

## Usage

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' or 'dev'.
TAG is '2.20.2', '3.2', '3.3', '3.4', '3.5', '3.6', '3.7' or 'dev'.

#### NEST 2.20.2

Expand All @@ -36,7 +37,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.6
#### NEST 3.7

To use 'docker-compose' you need the definition file from the git repository. Download it:

Expand All @@ -49,7 +50,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.6
nest/nest-simulator:3.7

Starts the NEST API server container and opens the corresponding port 52425. Test it with `curl localhost:52425/api`.

Expand All @@ -60,9 +61,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.6
nest/nest-simulator:3.7
docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` -p 54286:54286 \
-e NEST_CONTAINER_MODE=nest-desktop nest/nest-simulator:3.6
-e NEST_CONTAINER_MODE=nest-desktop nest/nest-simulator:3.7

Starts the NEST server and the NEST desktop web interface. Port 54286 is also made available.
Open in the web browser: `http://localhost:54286`
Expand All @@ -74,9 +75,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.6
-p 8080:8080 nest/nest-simulator:3.7

Starts a notebook server with pre-installed NEST 3.4. The corresponding URL is displayed in the console.
Starts a notebook server with pre-installed NEST 3.7. The corresponding URL is displayed in the console.

- Jupyter lab with NEST

Expand All @@ -85,9 +86,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.6
-p 8080:8080 nest/nest-simulator:3.7

Starts a jupyter lab server with pre-installed NEST 3.4. The corresponding URL is displayed in the console.
Starts a jupyter lab server with pre-installed NEST 3.7. The corresponding URL is displayed in the console.

To stop and delete running containers use `docker-compose down`.

Expand Down Expand Up @@ -128,7 +129,7 @@ You can clone this repository and use the shell script:
[<args>] can be either 'notebook', 'jupyterlab', or 'interactice'.
[<version>] 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' or 'all').
'3.6', '3.7' or 'all').

Example: sh run.sh provision dev
sh run.sh run notebook dev
Expand All @@ -137,7 +138,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.2, dev, ...)
In the next steps, VERSION is the kind of docker image you want to use (3.7, dev, ...)

Two little steps to get started

Expand Down Expand Up @@ -190,7 +191,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.6 /bin/bash
nest/nest-simulator:3.7 /bin/bash

You are now on container's shell.

Expand Down
2 changes: 1 addition & 1 deletion ci-templates/000_3.6.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Build_36:
--tag nest/nest-simulator:3.6
./src/3.6
# Test
- docker run -i --rm nest/nest-simulator:3.6 bash /opt/test-nest.sh
# - docker run -i --rm nest/nest-simulator:3.6 bash /opt/test-nest.sh
# Deploy
- echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin
- docker push nest/nest-simulator:3.6
Expand Down
14 changes: 7 additions & 7 deletions ci-templates/000_3.7.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################
### 3.7rc1 ###
### 3.7 ###
###############################################


Expand All @@ -9,16 +9,16 @@ Build_3.7:
- when: always
script:
# Build
- docker pull push nest/nest-simulator:3.7rc1 || true
- docker pull push nest/nest-simulator:3.7 || true
- docker build
--cache-from nest/nest-simulator:3.7rc1
--tag nest/nest-simulator:3.7rc1
./src/3.7rc1
--cache-from nest/nest-simulator:3.7
--tag nest/nest-simulator:3.7
./src/3.7
# Test
#- docker run -i --rm nest/nest-simulator:3.7rc1 bash /opt/test-nest.sh
#- docker run -i --rm nest/nest-simulator:3.7bash /opt/test-nest.sh
# Deploy
- echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin
- docker push nest/nest-simulator:3.7rc1
- docker push nest/nest-simulator:3.7
- docker logout $DOCKERHUB_REGISTRY
tags:
- shell-runner
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ version: "3"

services:
nest-server:
image: nest/nest-simulator:3.7rc1
image: nest/nest-simulator:3.7
environment:
LOCAL_USER_ID: "`id -u $USER`"
NEST_CONTAINER_MODE: "nest-server"
ports:
- "52425:52425"

nest-desktop:
image: nest/nest-simulator:3.7rc1
image: nest/nest-simulator:3.7
environment:
LOCAL_USER_ID: "`id -u $USER`"
NEST_CONTAINER_MODE: "nest-desktop"
Expand All @@ -20,7 +20,7 @@ services:
- nest-server

nest-notebook:
image: nest/nest-simulator:3.7rc1
image: nest/nest-simulator:3.7
volumes:
- .:/opt/data
environment:
Expand All @@ -30,7 +30,7 @@ services:
- "8080:8080"

nest-jupyterlab:
image: nest/nest-simulator:3.7rc1
image: nest/nest-simulator:3.7
volumes:
- .:/opt/data
environment:
Expand Down
16 changes: 8 additions & 8 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ 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.7rc1','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','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.7rc1 )
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 )
echo "Build the NEST image for NEST $1"
echo
docker build -t nest/nest-simulator:"$1" ./src/"$1"
Expand All @@ -73,7 +73,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.7rc1, dev and latest_daint"
echo "3.3, 3.4, 3.5, 3.6, 3.7, 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
Expand All @@ -90,7 +90,7 @@ case $command in
docker build -t nest/nest-simulator:3.4 ./src/3.4
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.7rc1 ./src/3.7rc1
docker build -t nest/nest-simulator:3.7 ./src/3.7
docker build -t nest/nest-simulator:dev ./src/dev
docker build -t nest/nest-simulator:latest_daint ./src/latest_daint
echo
Expand All @@ -114,14 +114,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.7rc1)"
echo "2.20.1, 2.20.2, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7)"
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.7rc1 )
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 )
echo "Run NEST-$2 with Jupyter Notebook".
echo
docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` --name my_app \
Expand All @@ -137,7 +137,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.7rc1 )
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 )
echo
docker run -it --rm -e LOCAL_USER_ID=`id -u $USER` --name my_app \
-v $(pwd):/opt/data -e NEST_CONTAINER_MODE=jupyterlab \
Expand All @@ -152,7 +152,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.7rc1 )
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 )
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 \
Expand Down
2 changes: 1 addition & 1 deletion src/3.6/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ elif [[ "${MODE}" = 'nest-server' ]]; then
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:-*}"
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}"
Expand Down
12 changes: 6 additions & 6 deletions src/3.7rc1/Dockerfile → src/3.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:22.04
LABEL maintainer="s.graber@fz-juelich.de"

ARG NEST_VERSION=3.7_rc1
ARG NEST_VERSION=3.7
ARG SRC_PATH=/tmp
ARG CMAKE_C_COMPILER_LAUNCHER=ccache
ARG CMAKE_CXX_COMPILER_LAUNCHER=ccache
Expand All @@ -15,7 +15,7 @@ ENV TERM=xterm \
RUN apt-get update && apt-get install -y --no-install-recommends \
automake \
autotools-dev \
build-essential \
build-essential \
ccache \
cmake \
curl \
Expand All @@ -42,7 +42,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libpcre3-dev \
libpython3.10 \
libreadline-dev \
libreadline8 \
libreadline8 \
libtool \
libzmq3-dev \
llvm-dev \
Expand All @@ -64,12 +64,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python3-mpi4py \
python3-nose \
python3-numpy \
python3-pandas \
python3-pandas \
python3-path \
python3-pip \
python3-pytest \
python3-pytest-timeout \
python3-pytest-xdist \
python3-pytest-xdist \
python3-restrictedpython \
python3-scipy \
python3-setuptools \
Expand Down Expand Up @@ -109,7 +109,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
-Dwith-openmp=ON \
-Dwith-libneurosim=OFF \
-Dwith-sionlib=OFF \
-Dwith-music='$HOME/.cache/libneurosim.install' \
-Dwith-music='$HOME/.cache/libneurosim.install' \
-Dwith-hdf5=ON \
${SRC_PATH}/nest-simulator-${NEST_VERSION} && \
make && \
Expand Down
2 changes: 1 addition & 1 deletion src/3.7rc1/entrypoint.sh → src/3.7/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ elif [[ "${MODE}" = 'nest-server' ]]; then
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:-*}"
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}"
Expand Down
File renamed without changes.
21 changes: 10 additions & 11 deletions src/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV TERM=xterm \
RUN apt-get update && apt-get install -y --no-install-recommends \
automake \
autotools-dev \
build-essential \
build-essential \
ccache \
cmake \
curl \
Expand All @@ -41,7 +41,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libpcre3-dev \
libpython3.10 \
libreadline-dev \
libreadline8 \
libreadline8 \
libtool \
libzmq3-dev \
llvm-dev \
Expand All @@ -63,12 +63,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python3-mpi4py \
python3-nose \
python3-numpy \
python3-pandas \
python3-pandas \
python3-path \
python3-pip \
python3-pytest \
python3-pytest-timeout \
python3-pytest-xdist \
python3-pytest-xdist \
python3-restrictedpython \
python3-scipy \
python3-setuptools \
Expand All @@ -86,7 +86,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
apt-get autoremove

RUN python3 -m pip install --upgrade pip setuptools wheel mock
RUN python3 -m pip install --force-reinstall --upgrade --no-binary=h5py h5py
RUN python3 -m pip install --force-reinstall --upgrade --no-binary=h5py h5py
RUN ldconfig


Expand All @@ -101,7 +101,7 @@ RUN python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/doc/req
RUN chmod +x ${SRC_PATH}/nest-simulator-${NEST_VERSION}/build_support/install_music.sh && \
${SRC_PATH}/nest-simulator-${NEST_VERSION}/build_support/install_music.sh

# # Install libneurosim
# # Install libneurosim
# RUN cd ${SRC_PATH}/nest-simulator-${NEST_VERSION} && \
# PYLIB_DIR="$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))" | sed 's/include/lib/')" && \
# chmod +x ${SRC_PATH}/nest-simulator-${NEST_VERSION}/build_support/install_csa-libneurosim.sh && \
Expand All @@ -127,19 +127,18 @@ RUN mkdir ${SRC_PATH}/nest-build && cd $_ && \
-Dwith-openmp=ON \
-Dwith-libneurosim=OFF \
-Dwith-sionlib=OFF \
-Dwith-music=ON \
-Dwith-music=ON \
-Dwith-hdf5=ON \
${SRC_PATH}/nest-simulator-${NEST_VERSION} && \
make && \
make install

# Install NESTML and more
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_testing.txt && \
python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_nest_server.txt && \
python3 -m pip install nest-desktop && \
python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements.txt && \
python3 -m pip install nest-desktop --pre && \
python3 -m pip uninstall nestml -y && \
python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/heads/master.zip
python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/heads/master.zip

RUN python3 -m pip install --force-reinstall --upgrade scipy

Expand Down
2 changes: 1 addition & 1 deletion src/dev/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ elif [[ "${MODE}" = 'nest-server' ]]; then
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:-*}"
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}"
Expand Down