From 884c4d9adb11c492f0a15aabb061871eb9f57b05 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Thu, 4 Apr 2024 12:15:40 +0200 Subject: [PATCH 1/4] Fix nest server requirements (#222) * Merge build and deploy to fix deploy problems * 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 26b8963a1edd577dd37a8a25a6a39872c68ce901 Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Thu, 4 Apr 2024 12:36:41 +0200 Subject: [PATCH 2/4] Fix nest-server, nest-desktop and compose file (#223) * Merge build and deploy to fix deploy problems * Add nest-server requirements * 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 972571d9d39fb5c10919ca25a3de3eac05046b63 Mon Sep 17 00:00:00 2001 From: Sebastian Spreizer Date: Thu, 4 Apr 2024 13:38:50 +0200 Subject: [PATCH 3/4] Fix cors origin (#224) --- src/3.7rc1/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3.7rc1/entrypoint.sh b/src/3.7rc1/entrypoint.sh index de46708..ffaa0d3 100644 --- a/src/3.7rc1/entrypoint.sh +++ b/src/3.7rc1/entrypoint.sh @@ -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:-http://localhost:*}" + export NEST_SERVER_CORS_ORIGINS="${NEST_SERVER_CORS_ORIGINS:-*}" 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}" From 15fd9ce4b2245368423ac21ecfb3d2c305ee9c86 Mon Sep 17 00:00:00 2001 From: Sebastian Spreizer Date: Thu, 4 Apr 2024 14:13:37 +0200 Subject: [PATCH 4/4] Fix requirements and cors origins for nest-server (#225) --- src/3.6/entrypoint.sh | 2 +- src/3.7rc1/Dockerfile | 10 +++++----- src/dev/Dockerfile | 21 +++++++++++---------- src/dev/entrypoint.sh | 2 +- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/3.6/entrypoint.sh b/src/3.6/entrypoint.sh index f500dee..66bb84c 100644 --- a/src/3.6/entrypoint.sh +++ b/src/3.6/entrypoint.sh @@ -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:-http://localhost:*}" + export NEST_SERVER_CORS_ORIGINS="${NEST_SERVER_CORS_ORIGINS:-*}" 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}" diff --git a/src/3.7rc1/Dockerfile b/src/3.7rc1/Dockerfile index 421a278..3ad9225 100644 --- a/src/3.7rc1/Dockerfile +++ b/src/3.7rc1/Dockerfile @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 && \ diff --git a/src/dev/Dockerfile b/src/dev/Dockerfile index 01f9f3c..ff65610 100644 --- a/src/dev/Dockerfile +++ b/src/dev/Dockerfile @@ -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 \ @@ -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 \ @@ -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 \ @@ -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 @@ -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 && \ @@ -127,7 +127,7 @@ 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 && \ @@ -135,10 +135,11 @@ 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 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/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 diff --git a/src/dev/entrypoint.sh b/src/dev/entrypoint.sh index de46708..ffaa0d3 100644 --- a/src/dev/entrypoint.sh +++ b/src/dev/entrypoint.sh @@ -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:-http://localhost:*}" + export NEST_SERVER_CORS_ORIGINS="${NEST_SERVER_CORS_ORIGINS:-*}" 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}"