diff --git a/lmod/Dockerfile b/lmod/Dockerfile index 2a27fbf707f1b0a4e453b0c07a9524953fd14322..41af86a6e445c9f82affcd1d017b4b59fec2a4bd 100644 --- a/lmod/Dockerfile +++ b/lmod/Dockerfile @@ -1,9 +1,4 @@ -# Ubuntu 20.04 (focal) -# https://hub.docker.com/_/ubuntu/?tab=tags&name=focal -# OS/ARCH: linux/amd64 -ARG ROOT_CONTAINER=ubuntu:focal-20220801 -#ARG ROOT_CONTAINER=ubuntu:jammy-20220801 - +ARG ROOT_CONTAINER=rockylinux:8.8.20230518 ARG BASE_CONTAINER=$ROOT_CONTAINER FROM $BASE_CONTAINER @@ -15,12 +10,11 @@ ARG NB_GID="100" # Install global packages. USER root -ENV DEBIAN_FRONTEND noninteractive -COPY files/apt_packages.txt /tmp/apt_packages.txt -RUN apt-get update && \ - cat /tmp/apt_packages.txt | xargs apt install -yq && \ - apt-get clean && rm -rf /var/lib/apt/lists/* - +RUN dnf -y update && \ + # Needed for davfs2 + dnf -y install epel-release && \ + dnf -y install bzip2 davfs2 findutils gcc make procps rsync sudo tcl-devel wget && \ + dnf clean all # Copy a script that we will use to correct permissions after running certain commands COPY files/fix-permissions /usr/local/bin/fix-permissions RUN chmod a+rx /usr/local/bin/fix-permissions @@ -40,17 +34,14 @@ RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \ # Download lua and lmod RUN mkdir -p /opt/apps/install RUN wget -O /opt/apps/install/lua-5.1.4.9.tar.bz2 https://sourceforge.net/projects/lmod/files/lua-5.1.4.9.tar.bz2/download -RUN wget -O /opt/apps/install/lmod-8.4.tar.bz2 https://sourceforge.net/projects/lmod/files/Lmod-8.4.tar.bz2/download +RUN wget -O /opt/apps/install/lmod-8.7.tar.bz2 https://sourceforge.net/projects/lmod/files/Lmod-8.7.tar.bz2/download # Install lua COPY --chown=root:root ./install_files/lua /opt/apps/install/lua RUN /bin/bash /opt/apps/install/lua/install_lua_5.1.4.9.sh # Install lmod COPY --chown=root:root ./install_files/lmod /opt/apps/install/lmod -RUN /bin/bash /opt/apps/install/lmod/install_lmod_8.4.sh - -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt install -y gcc g++ nodejs -RUN wget -O /tmp/libssl1.0.0.deb http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb && apt install /tmp/libssl1.0.0.deb +RUN /bin/bash /opt/apps/install/lmod/install_lmod_8.7.sh WORKDIR /home/$NB_USER COPY files/bash.bashrc /etc/bash.bashrc @@ -58,3 +49,4 @@ COPY files/mnt.sh /tmp/mnt.sh RUN /bin/bash /tmp/mnt.sh && rm /tmp/mnt.sh USER jovyan +ENTRYPOINT ["/bin/bash", "/tmp/custom/load_jupyter_version.sh", "&&", "/bin/bash", "/tmp/custom/load_jupyter_modules.sh"] \ No newline at end of file diff --git a/lmod/files/apt_packages.txt b/lmod/files/apt_packages.txt deleted file mode 100644 index be7631aa0749a78ba041ed02e6b26f6dfe8afca1..0000000000000000000000000000000000000000 --- a/lmod/files/apt_packages.txt +++ /dev/null @@ -1,27 +0,0 @@ -build-essential -ca-certificates -curl -curlftpfs -davfs2 -fio -fonts-liberation -fuse -git -htop -iperf -less -libncurses5-dev -libncursesw5-dev -locales -make -netcat -python3.8 -python3.8-dev -python3.8-distutils -python3.8-venv -rsync -run-one -sudo -tcl-dev -vim -wget diff --git a/lmod/install_files/lmod/install_lmod_8.4.sh b/lmod/install_files/lmod/install_lmod_8.7.sh similarity index 79% rename from lmod/install_files/lmod/install_lmod_8.4.sh rename to lmod/install_files/lmod/install_lmod_8.7.sh index 81a4326598d4ea26a7ba607cec2bc40bbae93ea2..4555c70a4b10442cb8097ce076346dff68dcbe72 100644 --- a/lmod/install_files/lmod/install_lmod_8.4.sh +++ b/lmod/install_files/lmod/install_lmod_8.7.sh @@ -1,7 +1,7 @@ #!/bin/bash cd /opt/apps/install -tar xf lmod-8.4.tar.bz2 -cd /opt/apps/install/Lmod-8.4 +tar xf lmod-8.7.tar.bz2 +cd /opt/apps/install/Lmod-8.7 ./configure --prefix /opt/apps make install ln -s /opt/apps/lmod/lmod/init/profile /etc/profile.d/z00_lmod.sh