## Emacs, make this -*- mode: sh; -*- FROM debian:bullseye-slim LABEL org.label-schema.license="All rights are reserved." \ org.label-schema.vendor="Fondazione The Microsoft Research - University of Trento Centre for Computational and Systems Biology (COSBI)" \ maintainer="Danilo Tomasoni " # Set the home and working directory for qspcc server WORKDIR /qspcc ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 # see https://bugs.debian.org/775775 # and https://github.com/docker-library/java/issues/19#issuecomment-70546872 ENV CA_CERTIFICATES_JAVA_VERSION 20170531+nmu1 ENV JAVA_HOME /docker-java-home # MKL env variables ENV MKL_PATH /opt/intel # LAYER-- Pre-requisites for building from source. Clean-up will occur later RUN apt-get update \ && apt-get install -y --no-install-recommends \ ed \ make \ cmake \ cpio \ gcc-9 \ g++-9 \ gfortran \ build-essential \ locales \ vim-tiny \ wget \ ca-certificates \ bzip2 \ unzip \ xz-utils \ libtool \ zlib1g-dev \ liblapack-dev \ liblapack3 \ # dkms linux-headers-generic gnupg \ gnuplot-nox \ intel-opencl-icd \ && \ ## default gcc 9 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8; \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 --slave /usr/bin/g++ g++ /usr/bin/g++-9 \ && \ ## Configure default locale, see https://github.com/rocker-org/rocker/issues/19 echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ && locale-gen en_US.utf8 \ && /usr/sbin/update-locale LANG=en_US.UTF-8 \ # ENV LC_ALL en_US.UTF-8 # ENV LANG en_US.UTF-8 # LAYER--JAVA ============================ # add a simple script that can auto-detect the appropriate JAVA_HOME value # based on whether the JDK or only the JRE is installed ## see https://bugs.debian.org/775775 ## and https://github.com/docker-library/java/issues/19#issuecomment-70546872 #ENV CA_CERTIFICATES_JAVA_VERSION 20170531+nmu1 #ENV JAVA_HOME /docker-java-home #RUN { \ && { \ echo '#!/bin/sh'; \ echo 'set -e'; \ echo; \ echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ } > /usr/local/bin/docker-java-home \ && chmod +x /usr/local/bin/docker-java-home \ && \ # do some fancy footwork to create a JAVA_HOME that's cross-architecture-safe ln -svT "/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)" /docker-java-home \ && \ set -ex; \ # deal with slim variants not having man page directories (which causes "update-alternatives" to fail) if [ ! -d /usr/share/man/man1 ]; then \ mkdir -p /usr/share/man/man1; \ fi; \ apt-get install -y \ openjdk-11-jre-headless \ ca-certificates-java \ && \ # see CA_CERTIFICATES_JAVA_VERSION notes above /var/lib/dpkg/info/ca-certificates-java.postinst configure # LAYER--LIBS: ONEMKL + SUNDIALS + TCMALLOC + HDF5 + MATIO ==================== # Copy host's current directory contents COPY l_BaseKit_p_2022.2.0.262_offline.sh /qspcc/ RUN TERM=screen-256color sh l_BaseKit_p_2022.2.0.262_offline.sh -a --silent --eula accept --install-dir ${MKL_PATH} RUN . ${MKL_PATH}/setvars.sh # LAYER-- =========== HOUSEKEEPING ================= RUN cd /qspcc \ # clean the system && apt-get purge -y \ ed \ cpio \ # g++-9 \ gfortran \ vim-tiny \ wget \ build-essential \ bzip2 \ unzip \ xz-utils \ libicu67 \ libglib2.0-data \ tzdata \ # gnupg \ && apt-get autoremove -y \ && apt-get clean -y \ && apt-get autoclean -y \ #&& dpkg --purge `COLUMNS=300 dpkg -l "*" | egrep "^rc" | cut -d\ -f3` \ # packages purged that are needed && \ apt-get install -y --no-install-recommends \ procps \ # libstdc++-9-dev \ # && apt-get purge -y --allow-remove-essential \ # e2fsprogs \ && apt-get autoremove -y --allow-remove-essential \ && apt-get clean -y --allow-remove-essential \ && apt-get autoclean -y --allow-remove-essential \ # && dpkg --purge \ # dbus \ # adduser \ # passwd \ # gpgv \ # libsemanage1 \ # libsepol1 \ # apt \ # libapt-pkg6.0 \ # && rm -rf /var/log/apt /var/lib/apt/lists/*