From 624e280b6c316f8f01957f3e8cb3cf6bb28284f2 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Wed, 11 Jun 2025 15:06:01 +0200
Subject: [PATCH] COB-325: Adress review comments

---
 docker/cobalt/Dockerfile | 7 +++----
 docker/spack/Dockerfile  | 4 +++-
 infra/activate_cobalt.sh | 4 ----
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/docker/cobalt/Dockerfile b/docker/cobalt/Dockerfile
index c561c9c..e398cbb 100644
--- a/docker/cobalt/Dockerfile
+++ b/docker/cobalt/Dockerfile
@@ -4,8 +4,6 @@ FROM ${SOURCE_IMAGE}
 ARG SPACK_ENV_NAME_ARG="lofar"
 ENV SPACK_ENV_NAME=${SPACK_ENV_NAME_ARG}
 
-#COPY ./modules.yaml ./
-
 RUN git clone https://git.astron.nl/lofar2.0/cobalt.git
 
 RUN echo "SPACK_INSTALL_DIR: ${SPACK_INSTALL_DIR}"
@@ -17,12 +15,13 @@ RUN wget -O NVIDIA-driver.run https://us.download.nvidia.com/tesla/570.124.06/NV
     chmod +x NVIDIA-driver.run && \
     ./NVIDIA-driver.run -s --no-kernel-modules
 
-COPY ./configure.sh ./
+COPY ./infra/activate_cobalt ./
 
 RUN . ${SPACK_INSTALL_DIR}/share/spack/setup-env.sh && \
     . /etc/profile.d/modules.sh && \
     spack env activate ${SPACK_ENV_NAME} && \
     spack module tcl refresh -y && \
     cd cobalt && \
-    . ../configure.sh && \
+    . ../activate_cobalt.sh && \
+    cmake -S. -Bgnucxx11_opt && \
     make -C gnucxx11_opt/ -j 4
\ No newline at end of file
diff --git a/docker/spack/Dockerfile b/docker/spack/Dockerfile
index 0d446a1..38f10fb 100644
--- a/docker/spack/Dockerfile
+++ b/docker/spack/Dockerfile
@@ -3,13 +3,15 @@ FROM ${SOURCE_IMAGE}
 
 ARG SPACK_VERSION_ARG="0.23.1"
 ARG SPACK_INSTALL_DIR_ARG="/data/cobalt/spack/latest"
+ARG NVIDIA_DRIVER_URL_ARG="https://us.download.nvidia.com/tesla/570.124.06/NVIDIA-Linux-x86_64-570.124.06.run"
 
 ENV SPACK_VERSION=${SPACK_VERSION_ARG}
 ENV SPACK_INSTALL_DIR=${SPACK_INSTALL_DIR_ARG}
+ENV NVIDIA_DRIVER_URL=${NVIDIA_DRIVER_URL_ARG}
 
 COPY ansible.yaml /
 COPY environment.yaml /
 RUN ansible-playbook --extra-vars "spack_version=${SPACK_VERSION} spack_install_dir=${SPACK_INSTALL_DIR}" ansible.yaml
-RUN wget -O NVIDIA-driver.run https://us.download.nvidia.com/tesla/570.124.06/NVIDIA-Linux-x86_64-570.124.06.run && \
+RUN wget -O NVIDIA-driver.run ${NVIDIA_DRIVER_URL} && \
     chmod +x NVIDIA-driver.run && \
     ./NVIDIA-driver.run -s --no-kernel-modules
diff --git a/infra/activate_cobalt.sh b/infra/activate_cobalt.sh
index f55b5ae..e626a59 100644
--- a/infra/activate_cobalt.sh
+++ b/infra/activate_cobalt.sh
@@ -13,10 +13,6 @@ MODULES=(
   python unittest-cpp
 )
 
-# Load Spack environment
-#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
 
-- 
GitLab