From e6c043ba2e12a679689c1dd73f586a9db6d4322e Mon Sep 17 00:00:00 2001 From: Sebastian Spreizer Date: Thu, 4 Apr 2024 14:08:16 +0200 Subject: [PATCH] Fix requirements and cors origins for nest-server --- 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}"