From 1306f0e08c631b1c9acf53ab658b228978f7c6b5 Mon Sep 17 00:00:00 2001 From: Ujwal Kundur <ujwal.kundur@gmail.com> Date: Wed, 22 Jun 2022 17:56:49 +0530 Subject: [PATCH] Integration Test Scenario #6 Create a new debian image based on stable branch (Bullseye for now). Use Intel Toolkits with Ubuntu 20.04 LTS (which are based on Debian 11). This should prevent any GLIBC mismatch errors and other issues. --- .gitlab-ci.yml | 13 ++++ .../debian/{Dockerfile => base.Dockerfile} | 0 containers/debian/stable.Dockerfile | 76 +++++++++++++++++++ containers/oneapi/onedev.Dockerfile | 9 +-- 4 files changed, 92 insertions(+), 6 deletions(-) rename containers/debian/{Dockerfile => base.Dockerfile} (100%) create mode 100644 containers/debian/stable.Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c79ec74f..354e08f93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -39,6 +39,7 @@ variables: stages: - config + - build:base ## build stable Debian - build:oneapi_jug ## OneAPI + Jug_Dev Image - deploy ## build/deploy singularity images - finalize @@ -207,6 +208,18 @@ cuda_base:default: containers/cuda - !reference [.build, script] +debian_stable_base:default: + extends: .build + stage: build:base + needs: + - version + variables: + BUILD_IMAGE: "debian_stable_base" + script: + - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} + -f containers/debian/stable.Dockerfile + containers/debian + - !reference [.build, script] oneapi_jug_dev:default: extends: .build diff --git a/containers/debian/Dockerfile b/containers/debian/base.Dockerfile similarity index 100% rename from containers/debian/Dockerfile rename to containers/debian/base.Dockerfile diff --git a/containers/debian/stable.Dockerfile b/containers/debian/stable.Dockerfile new file mode 100644 index 000000000..209415823 --- /dev/null +++ b/containers/debian/stable.Dockerfile @@ -0,0 +1,76 @@ +# syntax=docker/dockerfile:1.2 + +# Minimal container based on Debian Stable for LTS packages, +# required for oneAPI containers +# Very lightweight container with a minimal build environment. + +FROM amd64/debian:stable-20220527-slim + + +COPY bashrc /root/.bashrc + +ENV CLICOLOR_FORCE=1 \ + LANGUAGE=en_US.UTF-8 \ + LANG=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 + +## Install additional packages. Remove the auto-cleanup functionality +## for docker, as we're using the new buildkit cache instead. +## TODO: libyaml-cpp-dev is a dependency for afterburner. We can probably remove +## this once afterburner is added to spack +RUN --mount=type=cache,target=/var/cache/apt \ + rm -f /etc/apt/apt.conf.d/docker-clean \ + && ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime \ + && echo "US/Eastern" > /etc/timezone \ + && apt-get -yqq update \ + && apt-get -yqq upgrade \ + && apt-get -yqq install --no-install-recommends \ + bc \ + ca-certificates \ + clang-format \ + clang-tidy \ + curl \ + file \ + build-essential \ + g++-10 \ + gcc-10 \ + gdb \ + gfortran-10 \ + ghostscript \ + git \ + gnupg2 \ + gv \ + iproute2 \ + iputils-ping \ + iputils-tracepath \ + less \ + libcbor-xs-perl \ + libjson-xs-perl \ + libyaml-cpp-dev \ + locales \ + lua-posix \ + make \ + nano \ + openssh-client \ + parallel \ + poppler-utils \ + time \ + unzip \ + valgrind \ + vim-nox \ + wget \ + && localedef -i en_US -f UTF-8 en_US.UTF-8 \ + && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 \ + && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 \ + && update-alternatives --install /usr/bin/gfortran gfortran \ + /usr/bin/gfortran-10 100 \ + && gcc --version \ + && curl -L \ + "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" \ + | bash \ + && apt-get -yqq update \ + && apt-get -yqq install --no-install-recommends \ + gitlab-runner \ + && apt-get -yqq autoremove \ + && rm -rf /var/lib/apt/lists/* + diff --git a/containers/oneapi/onedev.Dockerfile b/containers/oneapi/onedev.Dockerfile index 9b11017ed..12391b7bc 100644 --- a/containers/oneapi/onedev.Dockerfile +++ b/containers/oneapi/onedev.Dockerfile @@ -2,7 +2,7 @@ # Container based on Jug_dev with Intel oneAPI support. -# Start with Debian base and layer oneAPI on top, prevents spack compiler errors. +# Start with Debian-stable and layer oneAPI on top, prevents spack compiler errors. ## ======================================================================================== ## STAGE 1: spack builder image @@ -10,9 +10,9 @@ ## ======================================================================================== ARG DOCKER_REGISTRY="eicweb.phy.anl.gov:4567/containers/eic_container/" -ARG INTERNAL_TAG="testing" +ARG INTERNAL_TAG="unstable-mr-290-306" -FROM ${DOCKER_REGISTRY}debian_base:${INTERNAL_TAG} as builder +FROM ${DOCKER_REGISTRY}debian_stable_base:${INTERNAL_TAG} as builder ## Install some extra spack dependencies RUN --mount=type=cache,target=/var/cache/apt \ @@ -241,7 +241,6 @@ ENV CLICOLOR_FORCE=1 \ ## Install additional packages. Remove the auto-cleanup functionality ## for docker, as we're using the new buildkit cache instead. -## We also install gitlab-runner, from the buster package (as bullseye is not available atm) ## TODO: libyaml-cpp-dev is a dependency for afterburner. We can probably remove ## this once afterburner is added to spack RUN --mount=type=cache,target=/var/cache/apt \ @@ -290,8 +289,6 @@ RUN --mount=type=cache,target=/var/cache/apt \ && curl -L \ "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" \ | bash \ - && sed -i "s/bookworm/buster/" \ - /etc/apt/sources.list.d/runner_gitlab-runner.list \ && apt-get -yqq update \ && apt-get -yqq install --no-install-recommends \ gitlab-runner \ -- GitLab