From 64e4139d66e6c47ff1a1aef174684afebd8f9a41 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 23 Jul 2024 11:08:34 +0200 Subject: [PATCH 1/5] Remove CentOS 7 --- .github/workflows/build-neuron.yml | 2 -- scripts/environment_redhat_centos_7.sh | 4 ---- scripts/install_redhat_centos_7.sh | 27 -------------------------- 3 files changed, 33 deletions(-) delete mode 100644 scripts/environment_redhat_centos_7.sh delete mode 100755 scripts/install_redhat_centos_7.sh diff --git a/.github/workflows/build-neuron.yml b/.github/workflows/build-neuron.yml index a384446..b0e68b0 100644 --- a/.github/workflows/build-neuron.yml +++ b/.github/workflows/build-neuron.yml @@ -82,8 +82,6 @@ jobs: - { vm: macos-13, flavour: macOS } # GitHub Actions MacOS 12 runner - { vm: macos-12, flavour: macOS } - # CentOS7 Docker image - - { vm: ubuntu-latest, container: "centos:7", flavour: redhat } # Alma Linux 8 Docker image - { vm: ubuntu-latest, container: "almalinux:8.10", flavour: redhat } # CentOS Stream 9 Docker image diff --git a/scripts/environment_redhat_centos_7.sh b/scripts/environment_redhat_centos_7.sh deleted file mode 100644 index 46dc3b0..0000000 --- a/scripts/environment_redhat_centos_7.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# Ensure that the newer CMake version that was installed on CentOS7 is -# preferred over the original system version. -export PATH=/usr/local/sbin:/usr/local/bin:${PATH} diff --git a/scripts/install_redhat_centos_7.sh b/scripts/install_redhat_centos_7.sh deleted file mode 100755 index 65e645b..0000000 --- a/scripts/install_redhat_centos_7.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Use MPICH instead of OpenMPI on CentOS7, see #51. -# This variable will be read by install_redhat.sh -mpi_lib=mpich-devel -# EPEL is needed to get CMake 3 in CentOS7 -# SCL is needed to get a modern toolchain in CentOS7 -yum install -y epel-release centos-release-scl centos-release-scl-rh - -# Install a newer toolchain for CentOS7 -yum install -y cmake3 ${SOFTWARE_COLLECTIONS_centos_7} rh-python38-python-devel - -# Make sure `cmake` and `ctest` see the 3.x versions, instead of the ancient -# CMake 2 included in CentOS7 -alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \ - --slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \ - --slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \ - --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 - -# Install a newer version of Flex; this logic is copied from that in the -# Dockerfile that is used to build the NEURON Python wheels. -curl -L -o flex-2.6.4-9.el9.src.rpm http://mirror.stream.centos.org/9-stream/AppStream/source/tree/Packages/flex-2.6.4-9.el9.src.rpm -yum-builddep -y flex-2.6.4-9.el9.src.rpm -yum install -y rpm-build -rpmbuild --rebuild flex-2.6.4-9.el9.src.rpm -ls -R ${HOME}/rpmbuild -yum install -y ${HOME}/rpmbuild/RPMS/x86_64/*.rpm -flex --version From bb0a1c36cb083529e41f4cabf03ce090acf23b8e Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 23 Jul 2024 11:38:45 +0200 Subject: [PATCH 2/5] Pin NumPy again --- scripts/buildNeuron.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildNeuron.sh b/scripts/buildNeuron.sh index 77e96b5..c3b72f2 100755 --- a/scripts/buildNeuron.sh +++ b/scripts/buildNeuron.sh @@ -32,7 +32,7 @@ else pip install --upgrade plotly "ipywidgets>=7.0.0" fi if [[ -f external/nmodl/requirements.txt ]]; then - pip install --upgrade -r external/nmodl/requirements.txt + pip install --upgrade -r external/nmodl/requirements.txt 'numpy<2' fi # Needed for installation of older NEURON versions with Python 12 pip install --upgrade setuptools From e22bc6c17cdb86313dab7b23a9d3490d1c4dc8fe Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 23 Jul 2024 15:45:06 +0200 Subject: [PATCH 3/5] Install NumPy<2 after everything else, unconditionally --- scripts/buildNeuron.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/buildNeuron.sh b/scripts/buildNeuron.sh index c3b72f2..9b5ee2c 100755 --- a/scripts/buildNeuron.sh +++ b/scripts/buildNeuron.sh @@ -32,10 +32,12 @@ else pip install --upgrade plotly "ipywidgets>=7.0.0" fi if [[ -f external/nmodl/requirements.txt ]]; then - pip install --upgrade -r external/nmodl/requirements.txt 'numpy<2' + pip install --upgrade -r external/nmodl/requirements.txt fi # Needed for installation of older NEURON versions with Python 12 pip install --upgrade setuptools +# NumPy 2 support is currently not there yet +pip install 'numpy<2' # Set default compilers, but don't override preset values export CC=${CC:-gcc} From 32e1048a0887bac0b95fd33f8da740e0fe5a1707 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 23 Jul 2024 16:04:48 +0200 Subject: [PATCH 4/5] Update readme --- README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4614876..31a3781 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,14 @@ This repository hosts [scheduled GitHub Actions workflows](.github/workflows/neu The default branch of NEURON (and `neuron-nightly` wheel) is tested every night, and the latest tagged release (and corresponding `neuron` wheel) is tested once a week. -At present Ubuntu 20.04, Ubuntu 22.04, Fedora 37, Fedora 38, CentOS7, CentOS -Stream 8, CentOS Stream 9, Debian Bullseye (11), Debian Bookworm (12), macOS 11 -and macOS 12 are tested. +At present, Ubuntu 20.04, Ubuntu 24.04, Fedora 37, Fedora 40, CentOS Stream +9, Alma Linux 8, Debian Bullseye (11), Debian Bookworm (12), macOS 12 and +macOS 13 are tested. The tested distributions are generally configured with the explicit name/version of the second-newest version of the distribution at the time, while a generic "latest" tag is used for the latest version (where available). -There is currently an exception for the CentOS family, where three versions are -retained because the third-newest, CentOS7, is still in use on the BlueBrain5 -system. - This means that when a new version of a distribution is released, we automatically start testing it. When this happens, the old second-newest version generally becomes the @@ -35,7 +31,7 @@ The system packages needed on each platform are listed in the pair of scripts: scripts/install_{flavour}_{container}.sh [this file may be missing if no container-specific setup is needed] scripts/install_{flavour}.sh ``` -Taking CentOS7 (a RedHat based distribution) as an example, the scripts [install_redhat_centos:7.sh](scripts/install_redhat_centos:7.sh) and [install_redhat.sh](scripts/install_redhat.sh) install the required system packages that are not already included in the [centos:7](https://hub.docker.com/_/centos) image on Docker Hub. +Taking Alma Linux 8 (a RedHat based distribution) as an example, the scripts [install_redhat_almalinux_8_10.sh](scripts/install_redhat_almalinux_8_10.sh) and [install_redhat.sh](scripts/install_redhat.sh) install the required system packages that are not already included in the [almalinux:8.10](https://hub.docker.com/_/almalinux) image on Docker Hub. Some of the content of these scripts is specific to the GitHub Actions environment in which they are regularly tested; this is commented in the following way: ```sh @@ -58,14 +54,14 @@ scripts/environment.sh ``` In a local installation, you might prefer to place these commands in a `~/.bashrc` or `~/.zshrc` file. -When using RedHat-derived Linux distributions, such as Fedora and CentOS, some dependencies may be made available using [Software Collections](https://www.softwarecollections.org/en/). +When using RedHat-derived Linux distributions, such as Fedora and CentOS Stream, some dependencies may be made available using [Software Collections](https://www.softwarecollections.org/en/). These are enabled using the `scl enable collection_name command`, which launches a subshell and cannot trivially be included in the `environmentXXX.sh` scripts above. For interactive use, one can simply run ``` scl enable collection_name bash ``` to get a shell with the given collection enabled. -> When running in GitHub Actions, the `scl enable ...` command is injected in the [runUnprivileged.sh](wrappers/runUnprivileged.sh) wrapper, based on `SOFTWARE_COLLECTIONS_*` environment modules set in the [top-level YAML configuration](.github/workflows/neuron-ci.yaml). This is, for example, used to install a modern compiler toolchain on CentOS7. +> When running in GitHub Actions, the `scl enable ...` command is injected in the [runUnprivileged.sh](wrappers/runUnprivileged.sh) wrapper, based on `SOFTWARE_COLLECTIONS_*` environment modules set in the [top-level YAML configuration](.github/workflows/neuron-ci.yaml). ## Extra dependencies and NEURON installation The installation of extra packages (via `pip`) and the installation of NEURON itself is steered by the [buildNeuron.sh](scripts/buildNeuron.sh) script. From 94b98fe0b32b235e1fa121fab15dfee684083d83 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 23 Jul 2024 16:29:03 +0200 Subject: [PATCH 5/5] Any pip install now must also use numpy<2 --- scripts/buildNeuron.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/buildNeuron.sh b/scripts/buildNeuron.sh index 9b5ee2c..bb1662b 100755 --- a/scripts/buildNeuron.sh +++ b/scripts/buildNeuron.sh @@ -25,14 +25,14 @@ export PYTHON=$(command -v python) export PYTHONPATH=$(${PYTHON} -c 'import site; print(":".join(site.getsitepackages()))') # Install extra dependencies for NEURON into the virtual environment. -pip install --upgrade -r nrn_requirements.txt +pip install --upgrade -r nrn_requirements.txt 'numpy<2' if [[ -f ci_requirements.txt ]]; then - pip install --upgrade -r ci_requirements.txt + pip install --upgrade -r ci_requirements.txt 'numpy<2' else pip install --upgrade plotly "ipywidgets>=7.0.0" fi if [[ -f external/nmodl/requirements.txt ]]; then - pip install --upgrade -r external/nmodl/requirements.txt + pip install --upgrade -r external/nmodl/requirements.txt 'numpy<2' fi # Needed for installation of older NEURON versions with Python 12 pip install --upgrade setuptools