Skip to content

Commit

Permalink
Merge pull request #3042 from vkarak/ci/redefine-base-images
Browse files Browse the repository at this point in the history
[ci] Redefine CI base images
  • Loading branch information
vkarak authored Nov 6, 2023
2 parents 7d9ccc9 + 773bdc5 commit dc01139
Show file tree
Hide file tree
Showing 14 changed files with 184 additions and 174 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
modules-version: [Lmod, Lmod77, Tmod32, Tmod4]
modules-version: [lmod, lmod77, tmod32, tmod4]
steps:
- uses: actions/checkout@v3
- name: Login to GitHub Container Registry
Expand All @@ -81,10 +81,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image for ${{ matrix.modules-version }}
run: |
docker build -f ci-scripts/dockerfiles/${{ matrix.modules-version }}.dockerfile -t reframe:${{ matrix.modules-version }} .
docker build -f ci-scripts/dockerfiles/reframe-${{ matrix.modules-version }}.dockerfile -t reframe-${{ matrix.modules-version }}:latest .
- name: Run Unittests
run: |
docker run reframe:${{ matrix.modules-version }}
docker run reframe-${{ matrix.modules-version }}:latest
tutorialtest:
runs-on: ubuntu-latest
Expand All @@ -99,11 +99,11 @@ jobs:
- name: Build Image for Tutorial Tests
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
docker build -f ci-scripts/dockerfiles/tutorials.dockerfile -t reframe:tutorials .
docker build -f ci-scripts/dockerfiles/tutorials.dockerfile -t reframe-tutorials:latest .
docker logout
- name: Run Tutorial Tests
run: |
docker run reframe:tutorials
docker run reframe-tutorials:latest
unusedimports:
runs-on: ubuntu-latest
Expand Down
28 changes: 0 additions & 28 deletions ci-scripts/dockerfiles/Lmod-base.dockerfile

This file was deleted.

47 changes: 27 additions & 20 deletions ci-scripts/dockerfiles/Lmod.dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
#
# Execute this from the top-level ReFrame source directory
#


FROM ghcr.io/reframe-hpc/rfm-ci-base:lmod

# ReFrame user
RUN useradd -ms /bin/bash rfmuser

USER rfmuser

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/

WORKDIR /home/rfmuser/reframe

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/lmod.py -v"]
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
34 changes: 0 additions & 34 deletions ci-scripts/dockerfiles/Lmod77-base.dockerfile

This file was deleted.

35 changes: 24 additions & 11 deletions ci-scripts/dockerfiles/Lmod77.dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
#
# Execute this from the top-level ReFrame source directory
# LMod versions prior to 8.2 emitted Python commands differently, so we use this
# Dockerfile to test the bindings of older versions
#


FROM ghcr.io/reframe-hpc/rfm-ci-base:lmod77
FROM ubuntu:20.04

# ReFrame user
RUN useradd -ms /bin/bash rfmuser
ENV TZ=Europe/Zurich
ENV DEBIAN_FRONTEND=noninteractive
ENV _LMOD_VER=7.7

USER rfmuser
# Setup apt
RUN \
apt-get -y update && \
apt-get -y install ca-certificates && \
update-ca-certificates

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/
# Required utilities
RUN apt-get -y install wget

WORKDIR /home/rfmuser/reframe
# 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/*

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/lmod.py -v"]
ENV BASH_ENV=/usr/local/lmod/lmod/init/profile
10 changes: 0 additions & 10 deletions ci-scripts/dockerfiles/Tmod32-base.dockerfile

This file was deleted.

23 changes: 5 additions & 18 deletions ci-scripts/dockerfiles/Tmod32.dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
#
# Execute this from the top-level ReFrame source directory
#
FROM centos:7

FROM ghcr.io/reframe-hpc/rfm-ci-base:tmod32

# ReFrame user
RUN useradd -ms /bin/bash rfmuser

USER rfmuser

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/

WORKDIR /home/rfmuser/reframe

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod32.py -v"]
# Install Tmod 3.2.10
RUN yum -y install environment-modules && \
yum clean all && \
rm -rf /var/cache/yum
28 changes: 0 additions & 28 deletions ci-scripts/dockerfiles/Tmod4-base.dockerfile

This file was deleted.

36 changes: 22 additions & 14 deletions ci-scripts/dockerfiles/Tmod4.dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
#
# Execute this from the top-level ReFrame source directory
#
FROM ubuntu:20.04

FROM ghcr.io/reframe-hpc/rfm-ci-base:tmod4
ENV TZ=Europe/Zurich
ENV DEBIAN_FRONTEND=noninteractive
ENV _TMOD_VER=4.6.0

# ReFrame user
RUN useradd -ms /bin/bash rfmuser
# Setup apt
RUN \
apt-get -y update && \
apt-get -y install ca-certificates && \
update-ca-certificates

USER rfmuser
# Required utilities
RUN apt-get -y install wget less

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/
# 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/*

WORKDIR /home/rfmuser/reframe

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod4.py -v"]
ENV BASH_ENV=/usr/local/Modules/init/profile.sh
24 changes: 24 additions & 0 deletions ci-scripts/dockerfiles/reframe-lmod.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Execute this from the top-level ReFrame source directory
#


FROM ghcr.io/reframe-hpc/lmod:8.4.12

# Install ReFrame unit test requirements
RUN apt-get -y update && \
apt-get -y install gcc git make python3 python3-pip python3-venv

# ReFrame user
RUN useradd -ms /bin/bash rfmuser

USER rfmuser

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/

WORKDIR /home/rfmuser/reframe

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/lmod.py -v"]
24 changes: 24 additions & 0 deletions ci-scripts/dockerfiles/reframe-lmod77.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Execute this from the top-level ReFrame source directory
#


FROM ghcr.io/reframe-hpc/lmod:7.7

# Install ReFrame unit test requirements
RUN apt-get -y update && \
apt-get -y install gcc make python3 python3-pip python3-venv

# ReFrame user
RUN useradd -ms /bin/bash rfmuser

USER rfmuser

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/

WORKDIR /home/rfmuser/reframe

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/lmod.py -v"]
22 changes: 22 additions & 0 deletions ci-scripts/dockerfiles/reframe-tmod32.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Execute this from the top-level ReFrame source directory
#

FROM ghcr.io/reframe-hpc/tmod:3.2.10

# ReFrame requirements
RUN yum -y install gcc make git python3

# ReFrame user
RUN useradd -ms /bin/bash rfmuser

USER rfmuser

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/

WORKDIR /home/rfmuser/reframe

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod32.py -v"]
25 changes: 25 additions & 0 deletions ci-scripts/dockerfiles/reframe-tmod4.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Execute this from the top-level ReFrame source directory
#

FROM ghcr.io/reframe-hpc/tmod:4.6.0


# ReFrame requirements
RUN \
apt-get -y update && \
apt-get -y install gcc make git python3 python3-pip python3-venv

# ReFrame user
RUN useradd -ms /bin/bash rfmuser

USER rfmuser

# Install ReFrame from the current directory
COPY --chown=rfmuser . /home/rfmuser/reframe/

WORKDIR /home/rfmuser/reframe

RUN ./bootstrap.sh

CMD ["/bin/bash", "-c", "./test_reframe.py --rfm-user-config=ci-scripts/configs/tmod4.py -v"]
Loading

0 comments on commit dc01139

Please sign in to comment.