From 29adbb262ff08cda691e06bf1128fd78179d43ec Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Fri, 9 Feb 2024 12:27:14 +0000 Subject: [PATCH 1/9] Merge build and deploy to fix deploy problems --- ci-templates/000_3.6.gitlab-ci.yml | 16 +++++----------- ci-templates/000_dev.gitlab-ci.yml | 14 ++++---------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/ci-templates/000_3.6.gitlab-ci.yml b/ci-templates/000_3.6.gitlab-ci.yml index 8023a68..5422946 100644 --- a/ci-templates/000_3.6.gitlab-ci.yml +++ b/ci-templates/000_3.6.gitlab-ci.yml @@ -8,23 +8,16 @@ Build_36: rules: - when: always script: + # Build - docker pull nest/nest-simulator:3.6 || true - docker build --cache-from nest/nest-simulator:3.6 --tag nest/nest-simulator:3.6 ./src/3.6 - # Simple test + # Test - docker run -i --rm nest/nest-simulator:3.6 bash /opt/test-nest.sh - tags: - - shell-runner - -Deploy_36: - stage: deploy - needs: ["Build_36"] - rules: - - when: on_success - script: - - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin + # Deploy + - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:3.6 - docker tag nest/nest-simulator:3.6 $DOCKER_REGISTRY_IMAGE:3.6 - docker push $DOCKER_REGISTRY_IMAGE:3.6 @@ -32,3 +25,4 @@ Deploy_36: - docker logout $DOCKER_REGISTRY tags: - shell-runner + diff --git a/ci-templates/000_dev.gitlab-ci.yml b/ci-templates/000_dev.gitlab-ci.yml index 45c983a..af666ff 100644 --- a/ci-templates/000_dev.gitlab-ci.yml +++ b/ci-templates/000_dev.gitlab-ci.yml @@ -8,24 +8,18 @@ Build_Dev: rules: - when: always script: + # Build - docker pull push nest/nest-simulator:dev || true - docker build --cache-from nest/nest-simulator:dev --tag nest/nest-simulator:dev ./src/dev - # Simple test + # Test - docker run -i --rm nest/nest-simulator:dev bash /opt/test-nest.sh - tags: - - shell-runner - -Deploy_Dev: - stage: deploy - needs: ["Build_Dev"] - rules: - - when: on_success - script: + # Deploy - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:dev - docker logout $DOCKERHUB_REGISTRY tags: - shell-runner + From 1adf82e745bbfd587617352a01af2e5b3c6e4266 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Thu, 4 Apr 2024 09:56:21 +0000 Subject: [PATCH 2/9] Add nest-server requirements --- src/3.7rc1/Dockerfile | 1 + src/dev/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index 5ca0e22..fc1cc3e 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -116,6 +116,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ make install && \ 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 --pre && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/tags/v7.0.1-rc1.zip && \ diff --git a/src/dev/Dockerfile b/src/dev/Dockerfile index ade8ee3..01f9f3c 100644 --- a/src/dev/Dockerfile +++ b/src/dev/Dockerfile @@ -135,7 +135,7 @@ RUN mkdir ${SRC_PATH}/nest-build && cd $_ && \ # 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.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 From 53016176d0ec8490b7442238bae9d058aca6865e Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Thu, 4 Apr 2024 10:30:49 +0000 Subject: [PATCH 3/9] Fix nest-desktop and compose file --- docker-compose.yml | 8 ++++---- src/3.7rc1/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 96c7ef5..9504522 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: nest-server: - image: nest/nest-simulator:3.6 + image: nest/nest-simulator:3.7rc1 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.6 + image: nest/nest-simulator:3.7rc1 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.6 + image: nest/nest-simulator:3.7rc1 volumes: - .:/opt/data environment: @@ -30,7 +30,7 @@ services: - "8080:8080" nest-jupyterlab: - image: nest/nest-simulator:3.6 + image: nest/nest-simulator:3.7rc1 volumes: - .:/opt/data environment: diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index fc1cc3e..421a278 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -117,7 +117,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 --pre && \ + python3 -m pip install nest-desktop && \ python3 -m pip uninstall nestml -y && \ python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/tags/v7.0.1-rc1.zip && \ python3 -m pip install --force-reinstall --upgrade scipy From c384fb0a12df94bbbd534048df40099aafea01d5 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Fri, 12 Apr 2024 12:11:11 +0000 Subject: [PATCH 4/9] Add v3.7 --- ci-templates/000_3.7.gitlab-ci.yml | 14 +++++++------- docker-compose.yml | 8 ++++---- run.sh | 16 ++++++++-------- src/{3.7rc1 => 3.7}/Dockerfile | 2 +- src/{3.7rc1 => 3.7}/entrypoint.sh | 0 src/{3.7rc1 => 3.7}/test-nest.sh | 0 6 files changed, 20 insertions(+), 20 deletions(-) rename src/{3.7rc1 => 3.7}/Dockerfile (99%) rename src/{3.7rc1 => 3.7}/entrypoint.sh (100%) rename src/{3.7rc1 => 3.7}/test-nest.sh (100%) diff --git a/ci-templates/000_3.7.gitlab-ci.yml b/ci-templates/000_3.7.gitlab-ci.yml index ed4fb71..0787e97 100644 --- a/ci-templates/000_3.7.gitlab-ci.yml +++ b/ci-templates/000_3.7.gitlab-ci.yml @@ -1,5 +1,5 @@ ############################################### -### 3.7rc1 ### +### 3.7 ### ############################################### @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 9504522..1342de2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ 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" @@ -10,7 +10,7 @@ services: - "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" @@ -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: @@ -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: diff --git a/run.sh b/run.sh index 03955bf..f208944 100755 --- a/run.sh +++ b/run.sh @@ -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" @@ -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 @@ -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 @@ -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 \ @@ -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 \ @@ -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 \ diff --git a/src/3.7rc1/Dockerfile b/src/3.7/Dockerfile similarity index 99% rename from src/3.7rc1/Dockerfile rename to src/3.7/Dockerfile index 421a278..551368b 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7/Dockerfile @@ -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 diff --git a/src/3.7rc1/entrypoint.sh b/src/3.7/entrypoint.sh similarity index 100% rename from src/3.7rc1/entrypoint.sh rename to src/3.7/entrypoint.sh diff --git a/src/3.7rc1/test-nest.sh b/src/3.7/test-nest.sh similarity index 100% rename from src/3.7rc1/test-nest.sh rename to src/3.7/test-nest.sh From d01ede09a8187ded22642a8baa8efaf485727796 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Fri, 19 Apr 2024 04:49:25 +0000 Subject: [PATCH 5/9] Remove test --- ci-templates/000_3.6.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-templates/000_3.6.gitlab-ci.yml b/ci-templates/000_3.6.gitlab-ci.yml index 5422946..f27929e 100644 --- a/ci-templates/000_3.6.gitlab-ci.yml +++ b/ci-templates/000_3.6.gitlab-ci.yml @@ -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 From fa70bbb2b3226c7623397c166074e6af4b0b6c3f Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Fri, 19 Apr 2024 04:53:26 +0000 Subject: [PATCH 6/9] Add v3.7 to readme --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3779168..0d0df63 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ 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 @@ -22,7 +23,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' 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 @@ -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: @@ -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`. @@ -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` @@ -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 @@ -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`. @@ -128,7 +129,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' or 'all'). + '3.6', '3.7' or 'all'). Example: sh run.sh provision dev sh run.sh run notebook dev @@ -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 @@ -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. From 52d757518a4592aacdda23e1ed2da9fdc05fe79f Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Wed, 15 May 2024 12:32:58 +0000 Subject: [PATCH 7/9] Fix nestml version and add pygsl --- src/3.7/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/3.7/Dockerfile b/src/3.7/Dockerfile index 551368b..6c02a42 100644 --- a/src/3.7/Dockerfile +++ b/src/3.7/Dockerfile @@ -117,9 +117,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 uninstall nestml -y && \ - python3 -m pip install --upgrade https://github.com/nest/nestml/archive/refs/tags/v7.0.1-rc1.zip && \ + python3 -m pip install --upgrade pygsl && \ + python3 -m pip install --upgrade nest-desktop && \ + python3 -m pip install --upgrade nestml && \ python3 -m pip install --force-reinstall --upgrade scipy COPY entrypoint.sh /usr/local/bin/entrypoint.sh From b2ee7dac15611b3ed917c3f8d4a42e83fb1c64ea Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Wed, 17 Jul 2024 06:46:19 +0000 Subject: [PATCH 8/9] Install nestml fix for nest verssion --- src/3.8/Dockerfile | 10 +++++++--- src/dev/Dockerfile | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/3.8/Dockerfile b/src/3.8/Dockerfile index a6f038e..d33cd81 100644 --- a/src/3.8/Dockerfile +++ b/src/3.8/Dockerfile @@ -117,9 +117,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 nestml-server@git+https://github.com/babsey/nestml-server@v1.0-b1 && \ + python3 -m pip install --upgrade gsl wheel setuptools swig + +RUN python3 -m pip install https://api.github.com/repos/nest/nestml/zipball/pull/1087/head + + # python3 -m pip install nestml==8.0.0rc1 && \ + +RUN python3 -m pip install nestml-server@git+https://github.com/babsey/nestml-server@v1.0-b1 && \ python3 -m pip install --upgrade pygsl@git+https://github.com/pygsl/pygsl@v2.3.3 COPY entrypoint.sh /usr/local/bin/entrypoint.sh diff --git a/src/dev/Dockerfile b/src/dev/Dockerfile index 10472cd..c302eea 100644 --- a/src/dev/Dockerfile +++ b/src/dev/Dockerfile @@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ cython3 \ freeglut3-dev \ + git \ gosu \ jq \ less \ From 28e1391f2339adeb4ecf89322c49c13780c8a69c Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Thu, 18 Jul 2024 08:49:47 +0000 Subject: [PATCH 9/9] Fix merging errors --- src/3.8/Dockerfile | 13 ++++++++++--- src/3.8/entrypoint.sh | 6 +++++- src/dev/Dockerfile | 23 +++++++++++++++-------- src/dev/entrypoint.sh | 6 +++++- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/3.8/Dockerfile b/src/3.8/Dockerfile index d33cd81..5ea9258 100644 --- a/src/3.8/Dockerfile +++ b/src/3.8/Dockerfile @@ -90,7 +90,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 && \ + # Installing the requirements_docs.txt stops at some time with an error + # Installing every package fix it. + python3 -m pip install sphinx>=6.2.1 sphinx_rtd_theme sphinx_autobuild sphinx_gallery sphinx-tabs && \ + python3 -m pip install sphinx_design sphinx-material sphinx-copybutton sphinx-carousel && \ + python3 -m pip install sphinx-notfound-page sphinxcontrib-mermaid sphinxcontrib-plantuml nbsphinx && \ + python3 -m pip install numpydoc example Image breathe csvkit docutils PyYAML>=4.2b1 tqdm yamllint && \ + # RUN python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_docs.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 && \ @@ -119,11 +125,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ python3 -m pip install --upgrade scipy && \ python3 -m pip install --upgrade gsl wheel setuptools swig +#Latest update to nestml v8.0.0-rc1 RUN python3 -m pip install https://api.github.com/repos/nest/nestml/zipball/pull/1087/head # python3 -m pip install nestml==8.0.0rc1 && \ -RUN python3 -m pip install nestml-server@git+https://github.com/babsey/nestml-server@v1.0-b1 && \ +RUN python3 -m pip install nestml-server@git+https://github.com/babsey/nestml-server@v1.0-b3 && \ python3 -m pip install --upgrade pygsl@git+https://github.com/pygsl/pygsl@v2.3.3 COPY entrypoint.sh /usr/local/bin/entrypoint.sh @@ -132,5 +139,5 @@ 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 +EXPOSE 8080 52425 52426 54286 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/src/3.8/entrypoint.sh b/src/3.8/entrypoint.sh index 5b3df93..b27435e 100644 --- a/src/3.8/entrypoint.sh +++ b/src/3.8/entrypoint.sh @@ -11,11 +11,15 @@ 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 +export NESTML_MODULES_PATH=${NESTML_MODULES_PATH:-/tmp/nestmlmodules} + +# Set LD_LIBRARY_PATH for music and nestml modules +export LD_LIBRARY_PATH=${MUSIC_PATH}/lib:${NESTML_MODULES_PATH}:$LD_LIBRARY_PATH + MODE="${NEST_CONTAINER_MODE:-$1}" if [[ "${MODE}" = 'interactive' ]]; then read -p "Your python script: " name diff --git a/src/dev/Dockerfile b/src/dev/Dockerfile index c302eea..1282183 100644 --- a/src/dev/Dockerfile +++ b/src/dev/Dockerfile @@ -90,15 +90,23 @@ RUN python3 -m pip install --upgrade pip setuptools wheel mock RUN python3 -m pip install --force-reinstall --upgrade --no-binary=h5py h5py RUN ldconfig - - # Download NEST RUN cd ${SRC_PATH} && \ wget https://github.com/nest/nest-simulator/archive/refs/heads/${NEST_VERSION}.tar.gz -P ${SRC_PATH} && \ tar -xzf ${NEST_VERSION}.tar.gz -RUN python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/doc/requirements.txt && \ - python3 -m pip install sphinx_gallery==0.10.1 -# Install music + +# Installing the requirements_docs.txt stops at some time with an error +# Installing every package fix it. +RUN python3 -m pip install sphinx>=6.2.1 sphinx_rtd_theme sphinx_autobuild sphinx_gallery sphinx-tabs +RUN python3 -m pip install sphinx_design sphinx-material sphinx-copybutton sphinx-carousel +RUN python3 -m pip install sphinx-notfound-page sphinxcontrib-mermaid sphinxcontrib-plantuml nbsphinx +RUN python3 -m pip install numpydoc example Image breathe csvkit docutils PyYAML>=4.2b1 tqdm yamllint + +# RUN python3 -m pip install -r ${SRC_PATH}/nest-simulator-${NEST_VERSION}/requirements_docs.txt + +RUN python3 -m pip install sphinx_gallery==0.10.1 + + # Install music 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 @@ -136,11 +144,10 @@ RUN mkdir ${SRC_PATH}/nest-build && cd $_ && \ # Install NESTML and more RUN python3 -m pip install --upgrade pip && \ - 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 nestml-server@git+https://github.com/babsey/nestml-server@v1.0-b1 + python3 -m pip install nestml-server@git+https://github.com/babsey/nestml-server@v1.0-b3 RUN python3 -m pip install --force-reinstall --upgrade scipy @@ -150,5 +157,5 @@ 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 +EXPOSE 8080 52425 52426 54286 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/src/dev/entrypoint.sh b/src/dev/entrypoint.sh index 5b3df93..b27435e 100644 --- a/src/dev/entrypoint.sh +++ b/src/dev/entrypoint.sh @@ -11,11 +11,15 @@ 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 +export NESTML_MODULES_PATH=${NESTML_MODULES_PATH:-/tmp/nestmlmodules} + +# Set LD_LIBRARY_PATH for music and nestml modules +export LD_LIBRARY_PATH=${MUSIC_PATH}/lib:${NESTML_MODULES_PATH}:$LD_LIBRARY_PATH + MODE="${NEST_CONTAINER_MODE:-$1}" if [[ "${MODE}" = 'interactive' ]]; then read -p "Your python script: " name