diff --git a/README.md b/README.md
index 7f6edcd868e9135fe2834074d8691e19d30fbdc3..977c8eddf4ead1dff30fb7720d8d7e00cf94a0d5 100644
--- a/README.md
+++ b/README.md
@@ -46,19 +46,17 @@ module use /opt/spack/0.23.1/share/spack/modules/linux-debian12-zen2/gcc/12.2.0
 ## Building COBALT from source
 Now that all the prerequisites are met, the COBALT software can be installed as follows:
 ```bash
-git clone https://git.astron.nl/lofar2.0/cobalt.git
-cd cobalt
-source ../configure.sh
-make -C gnucxx11_opt/ -j
+git clone https://git.astron.nl/cobalt/cobalt
+# optional: cd cobalt && git checkout <branch> && cd ..
+source infra/activate_cobalt.sh
+cmake -S cobalt -B build
+make -C cobalt  -j
 ```
 
-The `configure.sh` file loads all the environment modules that are required to build the COBALT software. It also applies the following workarounds:
-1) The libraries of the host compiler (GCC 12) need to be added to the `LIBRARY_PATH`.
+This will checkout the COBALT repository in the `cobalt` subdirectory, set up your environment and build the COBALT software in the `build` directory.
 
 ## Notes: futher patches needed to run tests
-The following patches are needed to get the COBALT tests and code to run on the COBALT cluster:
-1) The path to libnvrtc-builtins.so (provided by Spack) needs to be added to LD_LIBRARY_PATH. Not doing so raises the error NVRTC_ERROR_BUILTIN_OPERATION_FAILURE.
-2) The casacore measures need to be installed:
+To get the COBALT tests and code to run on the COBALT cluster, the casacore measures need to be installed:
 ```bash
 wget ftp://ftp.astron.nl:21/outgoing/Measures/WSRT_Measures.ztar
 tar xfz WSRT_Measures.ztar
@@ -66,4 +64,10 @@ mkdir ~/measures
 mv geodetic ephemerides ~/measures
 echo 'measures.directory: $HOME/measures' > ~/.casarc
 ```
-3) make sure `ssh localhost` works without password
+
+Alternatively, use the system-wide casacore data:
+```bash
+echo 'measures.directory: /data/cobalt/IERS' > ~/.casarc
+```
+
+Also make sure that `ssh localhost` works without password.
diff --git a/configure.sh b/configure.sh
deleted file mode 100644
index 1d6d68d776299d8943f66bd0549c3b1c08556ae8..0000000000000000000000000000000000000000
--- a/configure.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-# Some of GCCs libraries are not found, add them to the library path
-export LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/12/
-
-# Load Spack environment modules
-module use /data/cobalt/spack/latest/share/spack/modules/linux-*/gcc/12.2.0
-module load binutils boost casacore cmake curl dal2 diffutils fftw hdf5 log4cplus numactl openblas openmpi py-lxml python unittest-cpp
-
-# tParset is broken, disable it
-#sed -i '/lofar_add_test(tParset/s/^/#/' CoInterface/test/CMakeLists.txt
-
-# Run CMake
-cmake -S. -B gnucxx11_opt
diff --git a/environment.yaml b/environment.yaml
index 17aa29c68268ba072cc791045446880ced32a2e0..bd438fb4435424dcf173a42db7ffec561cb14f82 100644
--- a/environment.yaml
+++ b/environment.yaml
@@ -9,14 +9,14 @@ spack:
     - cuda@12.6
     - curl
     - dal2@master
-    - fftw
+    - fftw~mpi
     - gdb
     - hdf5@1.14.4-3 +cxx+hl+threadsafe~mpi
     - log4cplus
     - ncurses
     - numactl
     - openblas threads=pthreads
-    - openmpi fabrics=ofi,ucx
+    - openmpi@5.0.5 fabrics=ofi,ucx ^ucx+dc+rc+rdmacm+verbs
     - py-kombu
     - py-lxml
     - python
diff --git a/infra/activate_cobalt.sh b/infra/activate_cobalt.sh
index 98549b46cebaf71534b0479bf5367c0637b3853e..f55b5aee8614248540ddfca7f79e14160f41f723 100644
--- a/infra/activate_cobalt.sh
+++ b/infra/activate_cobalt.sh
@@ -2,29 +2,34 @@
 # the modules needed by COBALT
 
 ROOT_DIR=/data/cobalt
-SPACK_VERSION=latest
+SPACK_VERSION=0.23.1
+GCC_VERSION=12.2.0
 
-SPACK_DIR=${ROOT_DIR}/spack/spack/${SPACK_VERSION}
-SPACK_REPO_DIR=${ROOT_DIR}/spack/repos
+SPACK_DIR=${ROOT_DIR}/spack/spack-${SPACK_VERSION}
 
 MODULES=(
   binutils boost casacore cuda curl dal2 diffutils fftw hdf5
-  log4cplus numactl openblas openmpi postgresql pqxx py-lxml
+  log4cplus numactl openblas openmpi py-lxml
   python unittest-cpp
 )
 
 # Load Spack environment
-source ${SPACK_DIR}/share/spack/setup-env.sh
-eval `${SPACK_DIR}/bin/spack env activate --sh lofar`
+#source ${SPACK_DIR}/share/spack/setup-env.sh
+#eval `${SPACK_DIR}/bin/spack env activate --sh lofar`
 
 # Enable repos & modules
 source /etc/profile.d/modules.sh # load this explicitly for non-interactive shells
-module use ${SPACK_DIR}/opt/spack/linux-*/gcc/12.2.0
 
+# Load Spack environment modules
+module use ${SPACK_DIR}/opt/spack/linux-*/gcc/${GCC_VERSION}
 module load "${MODULES[@]}"
 
 # Keep system libraries findable
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_HOME/targets/x86_64-linux/lib
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CUDA_ROOT/targets/x86_64-linux/lib
+
+# Some of GCCs libraries are not found, add them to the library path
+GCC_VERSION_MAJOR=$(gcc -dumpversion)
+export LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/gcc/x86_64-linux-gnu/$GCC_VERSION_MAJOR
 
 # Make OpenMPI config findable
 export OMPI_MCA_mca_base_param_files=${ROOT_DIR}/mca-params.conf