From 67f2003b65e7e2eebb8a0c4468e5e1fc542da06b Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 11 Jun 2025 01:01:40 +0200 Subject: [PATCH 1/2] Revert "Remove stale Dockerfiles" This reverts commit b765ddf68401b20e54a1bb1ac8f3a5c1d8b37311. --- ci-scripts/dockerfiles/Lmod.dockerfile | 27 ++++++++++++++++ ci-scripts/dockerfiles/Lmod77.dockerfile | 33 +++++++++++++++++++ ci-scripts/dockerfiles/Spack.dockerfile | 40 ++++++++++++++++++++++++ ci-scripts/dockerfiles/Tmod32.dockerfile | 10 ++++++ ci-scripts/dockerfiles/Tmod4.dockerfile | 27 ++++++++++++++++ 5 files changed, 137 insertions(+) create mode 100644 ci-scripts/dockerfiles/Lmod.dockerfile create mode 100644 ci-scripts/dockerfiles/Lmod77.dockerfile create mode 100644 ci-scripts/dockerfiles/Spack.dockerfile create mode 100644 ci-scripts/dockerfiles/Tmod32.dockerfile create mode 100644 ci-scripts/dockerfiles/Tmod4.dockerfile diff --git a/ci-scripts/dockerfiles/Lmod.dockerfile b/ci-scripts/dockerfiles/Lmod.dockerfile new file mode 100644 index 0000000000..b908d76022 --- /dev/null +++ b/ci-scripts/dockerfiles/Lmod.dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:20.04 + +ENV TZ=Europe/Zurich +ENV DEBIAN_FRONTEND=noninteractive +ENV _LMOD_VER=8.4.12 + +# Setup apt +RUN \ + apt-get -y update && \ + apt-get -y install ca-certificates && \ + update-ca-certificates + +# Required utilities +RUN apt-get -y install wget + +# Install Lmod +RUN \ + apt-get -y install lua5.3 lua-bit32:amd64 lua-posix:amd64 lua-posix-dev liblua5.3-0:amd64 liblua5.3-dev:amd64 tcl tcl-dev tcl8.6 tcl8.6-dev:amd64 libtcl8.6:amd64 && \ + wget -q https://github.com/TACC/Lmod/archive/${_LMOD_VER}.tar.gz -O lmod.tar.gz && \ + tar xzf lmod.tar.gz && \ + cd Lmod-${_LMOD_VER} && \ + ./configure && make install && \ + cd .. && rm -rf lmod.tar.gz Lmod-${_LMOD_VER} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +ENV BASH_ENV=/usr/local/lmod/lmod/init/profile diff --git a/ci-scripts/dockerfiles/Lmod77.dockerfile b/ci-scripts/dockerfiles/Lmod77.dockerfile new file mode 100644 index 0000000000..93612eaf56 --- /dev/null +++ b/ci-scripts/dockerfiles/Lmod77.dockerfile @@ -0,0 +1,33 @@ +# +# LMod versions prior to 8.2 emitted Python commands differently, so we use this +# Dockerfile to test the bindings of older versions +# + + +FROM ubuntu:20.04 + +ENV TZ=Europe/Zurich +ENV DEBIAN_FRONTEND=noninteractive +ENV _LMOD_VER=7.7 + +# Setup apt +RUN \ + apt-get -y update && \ + apt-get -y install ca-certificates && \ + update-ca-certificates + +# Required utilities +RUN apt-get -y install wget + +# Install Lmod +RUN \ + apt-get -y install lua5.3 lua-bit32:amd64 lua-posix:amd64 lua-posix-dev liblua5.3-0:amd64 liblua5.3-dev:amd64 tcl tcl-dev tcl8.6 tcl8.6-dev:amd64 libtcl8.6:amd64 lua-filesystem:amd64 lua-filesystem-dev:amd64 && \ + wget -q https://github.com/TACC/Lmod/archive/${_LMOD_VER}.tar.gz -O lmod.tar.gz && \ + tar xzf lmod.tar.gz && \ + cd Lmod-${_LMOD_VER} && \ + ./configure && make install && \ + cd .. && rm -rf lmod.tar.gz Lmod-${_LMOD_VER} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +ENV BASH_ENV=/usr/local/lmod/lmod/init/profile diff --git a/ci-scripts/dockerfiles/Spack.dockerfile b/ci-scripts/dockerfiles/Spack.dockerfile new file mode 100644 index 0000000000..dbfe8ba162 --- /dev/null +++ b/ci-scripts/dockerfiles/Spack.dockerfile @@ -0,0 +1,40 @@ +# +# Execute this from the top-level ReFrame source directory +# + +FROM ubuntu:20.04 + +ENV TZ=Europe/Zurich +ENV DEBIAN_FRONTEND=noninteractive +ENV _SPACK_VER=0.16 + +# ReFrame user +RUN useradd -ms /bin/bash rfmuser + +# ReFrame requirements +RUN \ + apt-get -y update && \ + apt-get -y install ca-certificates && \ + update-ca-certificates && \ + apt-get -y install gcc && \ + apt-get -y install make && \ + apt-get -y install git && \ + apt-get -y install python3 python3-pip python3-venv + +# Install ReFrame from the current directory +COPY --chown=rfmuser . /home/rfmuser/reframe/ + +USER rfmuser + +# Install Spack +RUN git clone https://github.com/spack/spack ~/spack && \ + cd ~/spack && \ + git checkout releases/v${_SPACK_VER} + +ENV BASH_ENV /home/rfmuser/spack/share/spack/setup-env.sh + +WORKDIR /home/rfmuser/reframe + +RUN ./bootstrap.sh + +CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/spack.py -v"] diff --git a/ci-scripts/dockerfiles/Tmod32.dockerfile b/ci-scripts/dockerfiles/Tmod32.dockerfile new file mode 100644 index 0000000000..fd9e94ecd8 --- /dev/null +++ b/ci-scripts/dockerfiles/Tmod32.dockerfile @@ -0,0 +1,10 @@ +FROM centos:7 + +RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo && \ + sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo && \ + sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo + +# Install Tmod 3.2.10 +RUN yum -y install environment-modules && \ + yum clean all && \ + rm -rf /var/cache/yum diff --git a/ci-scripts/dockerfiles/Tmod4.dockerfile b/ci-scripts/dockerfiles/Tmod4.dockerfile new file mode 100644 index 0000000000..d8f7fb66aa --- /dev/null +++ b/ci-scripts/dockerfiles/Tmod4.dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:20.04 + +ENV TZ=Europe/Zurich +ENV DEBIAN_FRONTEND=noninteractive +ENV _TMOD_VER=4.6.0 + +# Setup apt +RUN \ + apt-get -y update && \ + apt-get -y install ca-certificates && \ + update-ca-certificates + +# Required utilities +RUN apt-get -y install wget less + +# Install Tmod4 +RUN \ + apt-get -y install autoconf tcl-dev && \ + wget -q https://github.com/cea-hpc/modules/archive/v${_TMOD_VER}.tar.gz -O tmod.tar.gz && \ + tar xzf tmod.tar.gz && \ + cd modules-${_TMOD_VER} && \ + ./configure && make install && \ + cd .. && rm -rf tmod.tar.gz modules-${_TMOD_VER} && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +ENV BASH_ENV=/usr/local/Modules/init/profile.sh From a52fda2fee72fcbfb75eb5a7d9293d1d7f0fcc06 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 11 Jun 2025 01:02:41 +0200 Subject: [PATCH 2/2] Remove Spack dockerfile --- ci-scripts/dockerfiles/Spack.dockerfile | 40 ------------------------- 1 file changed, 40 deletions(-) delete mode 100644 ci-scripts/dockerfiles/Spack.dockerfile diff --git a/ci-scripts/dockerfiles/Spack.dockerfile b/ci-scripts/dockerfiles/Spack.dockerfile deleted file mode 100644 index dbfe8ba162..0000000000 --- a/ci-scripts/dockerfiles/Spack.dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# -# Execute this from the top-level ReFrame source directory -# - -FROM ubuntu:20.04 - -ENV TZ=Europe/Zurich -ENV DEBIAN_FRONTEND=noninteractive -ENV _SPACK_VER=0.16 - -# ReFrame user -RUN useradd -ms /bin/bash rfmuser - -# ReFrame requirements -RUN \ - apt-get -y update && \ - apt-get -y install ca-certificates && \ - update-ca-certificates && \ - apt-get -y install gcc && \ - apt-get -y install make && \ - apt-get -y install git && \ - apt-get -y install python3 python3-pip python3-venv - -# Install ReFrame from the current directory -COPY --chown=rfmuser . /home/rfmuser/reframe/ - -USER rfmuser - -# Install Spack -RUN git clone https://github.com/spack/spack ~/spack && \ - cd ~/spack && \ - git checkout releases/v${_SPACK_VER} - -ENV BASH_ENV /home/rfmuser/spack/share/spack/setup-env.sh - -WORKDIR /home/rfmuser/reframe - -RUN ./bootstrap.sh - -CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/spack.py -v"]