From 7c84fe237f8a3a703552c16ec13afbb403ee0bf5 Mon Sep 17 00:00:00 2001 From: MBueschelberger <46421269+MBueschelberger@users.noreply.github.com> Date: Sat, 26 Aug 2023 20:11:11 +0200 Subject: [PATCH] Enh/specific slurm version (#3) * update Dockerfile * add slurm version to be installed on demand --- .env.template | 1 + Dockerfile | 17 +++++++++++++++-- docker-compose.dev.yml | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.env.template b/.env.template index 1ab2555..08b9e3d 100755 --- a/.env.template +++ b/.env.template @@ -12,3 +12,4 @@ REAXPRO_MINIO_USER=rootname REAXPRO_MINIO_PASSWORD=rootname123 DOCKER_BUILD_TARGET=develop INSTALL_SLURM=no +SLURM_VERSION=23.02.4 diff --git a/Dockerfile b/Dockerfile index 5a3d832..da4924e 100755 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,21 @@ ARG GITHUB_ACCESS_TOKEN ARG EIGEN_REPO ARG CATALYTIC_FOAM_REPO ARG INSTALL_SLURM - -RUN if [[ "$INSTALL_SLURM" = "yes" ]] ; then apt install -y slurm-wlm ; else echo 'Slurm will not be installed.' ; fi +ARG SLURM_VERSION + +WORKDIR /tmp +RUN if [ "$INSTALL_SLURM" = "yes" ] ; \ + then \ + apt install -y munge && \ + wget "https://download.schedmd.com/slurm/slurm-${SLURM_VERSION}.tar.bz2" && \ + tar --bzip -x -f "slurm-${SLURM_VERSION}.tar.bz2" && \ + cd "slurm-${SLURM_VERSION}" && \ + ./configure && \ + make && \ + make install ; \ + else \ + echo 'Slurm will not be installed.' ; \ + fi # make code base in homedir read-/write-/executable to USER RUN chmod -R 0777 /home/openfoam diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b9361a1..bce95f7 100755 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -12,6 +12,7 @@ services: - WRAPPER_DEPS_EXTRA=$WRAPPER_DEPS_EXTRA - WRAPPER_DEPS_INSTALL=$WRAPPER_DEPS_INSTALL - INSTALL_SLURM=$INSTALL_SLURM + - SLURM_VERSION=$SLURM_VERSION target: "${DOCKER_BUILD_TARGET:-develop}" tty: True entrypoint: /bin/bash