Skip to content
Snippets Groups Projects
Commit 9cc31202 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: streamline building of base images

parent 7133e830
Branches
Tags
1 merge request!393feat: streamline building of base images
...@@ -45,9 +45,8 @@ variables: ...@@ -45,9 +45,8 @@ variables:
stages: stages:
- config - config
- build:base ## base OS image - base ## base OS image
- build:jug ## jug container images - jug ## jug container images
- build:oneapi_jug ## jug containers with Intel oneAPI support
- deploy ## build/deploy singularity images - deploy ## build/deploy singularity images
- test - test
- finalize - finalize
...@@ -80,7 +79,7 @@ workflow: ...@@ -80,7 +79,7 @@ workflow:
## plan: ## plan:
## Workflows: ## Workflows:
## - master --> config + all build stages + singularity ## - master --> config + all build stages + singularity
# + nightly build:jug + nightly singularity # + nightly jug + nightly singularity
## - v4.0-stable --> config + all build stages + singularity ## - v4.0-stable --> config + all build stages + singularity
## - v4.0.0 --> config + all build stages + singularity ## - v4.0.0 --> config + all build stages + singularity
## - MR --> config + all build stages ## - MR --> config + all build stages
...@@ -174,7 +173,7 @@ version: ...@@ -174,7 +173,7 @@ version:
${INTERNAL_TAG} --eicweb ${INTERNAL_TAG} --eicweb
## Images: ## Images:
## debian_base --> jug_dev --> jug_xl ## debian_testing_base --> jug_dev --> jug_xl
## ---------------> jug_sim ## ---------------> jug_sim
## ---------------> jug_ml ## ---------------> jug_ml
## debian_stable_base --> oneapi_jug_dev ## debian_stable_base --> oneapi_jug_dev
...@@ -183,166 +182,45 @@ version: ...@@ -183,166 +182,45 @@ version:
## TODO ## TODO
## oneapi_runtime + jug_xl --> oneapi_prod ## oneapi_runtime + jug_xl --> oneapi_prod
debian_base:default: base:
parallel:
matrix:
- BASE_IMAGE: amd64/debian:testing-20220822-slim
BUILD_IMAGE: debian_testing_base
- BASE_IMAGE: amd64/debian:stable-20220527-slim
BUILD_IMAGE: debian_stable_base_new
- BASE_IMAGE: ubuntu:20.04
BUILD_IMAGE: ubuntu_base
- BASE_IMAGE: intel/oneapi-hpckit:2022.3.0-devel-ubuntu20.04
BUILD_IMAGE: oneapi_base
- BASE_IMAGE: nvidia/cuda:11.8.0-devel-ubuntu20.04
BUILD_IMAGE: cuda_base
extends: .build extends: .build
stage: build:base stage: base
needs: needs:
- version - version
variables:
BUILD_IMAGE: "debian_base"
script: script:
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
-f containers/debian/base.Dockerfile -f containers/debian/base.Dockerfile
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg BUILD_IMAGE=${BUILD_IMAGE}
containers/debian containers/debian
- !reference [.build, script] - !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_base:default:
extends: .build
stage: build:base
needs:
- version
variables:
BUILD_IMAGE: "oneapi_base"
script:
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
-f containers/oneapi/base.Dockerfile
containers/oneapi
- !reference [.build, script]
oneapi_jug_dev:default:
extends: .build
stage: build:oneapi_jug
needs:
- version
- debian_stable_base:default
variables:
BUILD_IMAGE: "oneapi_jug_dev"
script:
## calculate a hash based on the spack.yaml file and the spack directory
## and use this spack as a docker variable to force a rebuild when there
## is a change (versus rerun from cache)
- PACKAGE_HASH=$(sha1sum spack.yaml | head -c40)
- echo "PACKAGE_HASH= ${PACKAGE_HASH}"
## Copy spack.yaml into build context
- cp spack.yaml containers/oneapi/spack.yaml
- CACHE_FLAG=""
- |
if [ $FORCE_NOCACHE = 1 ]; then
echo "FORCE_NOCACHE set"
export CACHE_FLAG="--no-cache"
fi
## Copy jug_dev files into build context
- cp -r containers/jug/* containers/oneapi
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG}
-f containers/oneapi/onedev.Dockerfile
--build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
--build-arg EICSPACK_VERSION="${EICSPACK_VERSION}"
--build-arg EICSPACK_CHERRYPICKS="${EICSPACK_CHERRYPICKS}"
--build-arg CACHE_BUST=${PACKAGE_HASH}
--build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD)
containers/oneapi
- !reference [.build, script]
oneapi_jug_xl:default:
extends: .build
stage: build:oneapi_jug
needs:
- version
- oneapi_jug_dev:default
variables:
BUILD_IMAGE: "oneapi_jug_xl"
script:
- cp containers/jug/setup_detectors.py containers/oneapi
- cp detectors.yaml containers/oneapi
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
-f containers/jug/xl.Dockerfile
--build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg BASEIMAGE="oneapi_jug_dev"
--build-arg JUGGLER_VERSION=${JUGGLER_VERSION}
--build-arg NPDET_VERSION=${NPDET_VERSION}
--build-arg JUG_VERSION=${INTERNAL_TAG}-$(git rev-parse HEAD)
containers/oneapi
- !reference [.build, script]
rules:
- when: manual
allow_failure: true
oneapi_jug_xl:nightly:
extends: .build
stage: build:oneapi_jug
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: on_success
- when: never
needs:
- version
- oneapi_jug_dev:default
variables:
BUILD_IMAGE: "oneapi_jug_xl"
script:
- cp containers/jug/setup_detectors.py containers/oneapi
- cp detectors.yaml containers/oneapi
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG}
-f containers/jug/xl.Dockerfile
--build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg BASEIMAGE="oneapi_jug_dev"
--build-arg JUG_VERSION=nightly-$(date +%Y-%m-%d_%H-%M-%S)-${INTERNAL_TAG}-$(git rev-parse HEAD)
--build-arg NIGHTLY=1
containers/oneapi
- |
PUSH_FLAG=""
if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then
PUSH_FLAG="--eicweb"
fi
- ./gitlab-ci/docker_push.sh -i ${BUILD_IMAGE} -l ${NIGHTLY_TAG}
-n $DOCKER_NTRIES -t $DOCKER_WAIT_TIME
${NIGHTLY_TAG} ${PUSH_FLAG}
- if [ -z "${PUSH_FLAG}" ] ; then
./gitlab-ci/docker_push.sh -i ${BUILD_IMAGE} -l ${NIGHTLY_TAG}
-n $DOCKER_NTRIES -t $DOCKER_WAIT_TIME
${NIGHTLY_TAG}-$(date +%Y-%m-%d) --dockerhub ;
fi
rules:
- when: manual
allow_failure: true
cuda_base:default:
extends: .build
stage: build:base
needs:
- version
variables:
BUILD_IMAGE: "cuda_base"
script:
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
containers/cuda
- !reference [.build, script]
jug_dev:default: jug_dev:default:
parallel:
matrix:
- BASE_IMAGE: debian_testing_base
BUILD_IMAGE: jug_dev
# - BASE_IMAGE: oneapi_base
# BUILD_IMAGE: jug_dev_oneapi
# - BASE_IMAGE: cuda_base_new
# BUILD_IMAGE: jug_dev_cuda
extends: .build extends: .build
stage: build:jug stage: jug
needs: needs:
- version - version
- debian_base:default - base
variables:
BUILD_IMAGE: "jug_dev"
script: script:
## calculate a hash based on the spack.yaml file and the spack directory ## calculate a hash based on the spack.yaml file and the spack directory
## and use this spack as a docker variable to force a rebuild when there ## and use this spack as a docker variable to force a rebuild when there
...@@ -362,6 +240,7 @@ jug_dev:default: ...@@ -362,6 +240,7 @@ jug_dev:default:
-t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:builder-${INTERNAL_TAG} -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:builder-${INTERNAL_TAG}
--target=builder --target=builder
-f containers/jug/dev.Dockerfile -f containers/jug/dev.Dockerfile
--build-arg BASE_IMAGE="${BASE_IMAGE}"
--build-arg SPACK_VERSION="${SPACK_VERSION}" --build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}" --build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
--build-arg EICSPACK_VERSION="${EICSPACK_VERSION}" --build-arg EICSPACK_VERSION="${EICSPACK_VERSION}"
...@@ -373,6 +252,7 @@ jug_dev:default: ...@@ -373,6 +252,7 @@ jug_dev:default:
## now build our image ## now build our image
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG} - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG}
-f containers/jug/dev.Dockerfile -f containers/jug/dev.Dockerfile
--build-arg BASE_IMAGE="${BASE_IMAGE}"
--build-arg SPACK_VERSION="${SPACK_VERSION}" --build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}" --build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
--build-arg EICSPACK_VERSION="${EICSPACK_VERSION}" --build-arg EICSPACK_VERSION="${EICSPACK_VERSION}"
...@@ -390,18 +270,23 @@ jug_dev:default: ...@@ -390,18 +270,23 @@ jug_dev:default:
- !reference [.build, script] - !reference [.build, script]
jug_xl:default: jug_xl:default:
parallel:
matrix:
- BASE_IMAGE: jug_dev
BUILD_IMAGE: jug_xl
# - BASE_IMAGE: jug_dev_oneapi
# BUILD_IMAGE: jug_xl_oneapi
extends: .build extends: .build
stage: build:jug stage: jug
resource_group: build resource_group: build
needs: needs:
- version - version
- jug_dev:default - jug_dev:default
variables:
BUILD_IMAGE: "jug_xl"
script: script:
- cp detectors.yaml containers/jug - cp detectors.yaml containers/jug
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
-f containers/jug/xl.Dockerfile -f containers/jug/xl.Dockerfile
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUGGLER_VERSION=${JUGGLER_VERSION} --build-arg JUGGLER_VERSION=${JUGGLER_VERSION}
--build-arg NPDET_VERSION=${NPDET_VERSION} --build-arg NPDET_VERSION=${NPDET_VERSION}
...@@ -410,8 +295,14 @@ jug_xl:default: ...@@ -410,8 +295,14 @@ jug_xl:default:
- !reference [.build, script] - !reference [.build, script]
jug_xl:nightly: jug_xl:nightly:
parallel:
matrix:
- BASE_IMAGE: jug_dev
BUILD_IMAGE: jug_xl
# - BASE_IMAGE: jug_dev_oneapi
# BUILD_IMAGE: jug_xl_oneapi
extends: .build extends: .build
stage: build:jug stage: jug
rules: rules:
- if: '$CI_COMMIT_BRANCH == "master"' - if: '$CI_COMMIT_BRANCH == "master"'
when: on_success when: on_success
...@@ -421,12 +312,11 @@ jug_xl:nightly: ...@@ -421,12 +312,11 @@ jug_xl:nightly:
needs: needs:
- version - version
- jug_dev:default - jug_dev:default
variables:
BUILD_IMAGE: "jug_xl"
script: script:
- cp detectors.yaml containers/jug - cp detectors.yaml containers/jug
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG} - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG}
-f containers/jug/xl.Dockerfile -f containers/jug/xl.Dockerfile
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg INTERNAL_TAG=${INTERNAL_TAG} --build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUG_VERSION=nightly-$(date +%Y-%m-%d_%H-%M-%S)-${INTERNAL_TAG}-$(git rev-parse HEAD) --build-arg JUG_VERSION=nightly-$(date +%Y-%m-%d_%H-%M-%S)-${INTERNAL_TAG}-$(git rev-parse HEAD)
--build-arg NIGHTLY=1 --build-arg NIGHTLY=1
...@@ -450,14 +340,13 @@ jug_xl:nightly: ...@@ -450,14 +340,13 @@ jug_xl:nightly:
jug_xl:feature: jug_xl:feature:
extends: .build extends: .build
stage: build:jug stage: jug
rules: rules:
- if: '$CI_COMMIT_BRANCH == "master"' - if: '$CI_COMMIT_BRANCH == "master"'
when: on_success when: on_success
- when: never - when: never
needs: needs:
- version - version
#- jug_xl:default
- jug_xl:nightly - jug_xl:nightly
variables: variables:
BUILD_IMAGE: "jug_xl" BUILD_IMAGE: "jug_xl"
...@@ -498,48 +387,6 @@ jug_xl:feature: ...@@ -498,48 +387,6 @@ jug_xl:feature:
- mkdir build - mkdir build
- singularity pull build/${BUILD_IMAGE}.sif docker://${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} - singularity pull build/${BUILD_IMAGE}.sif docker://${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
oneapi_jug_dev:singularity:default:
extends: .singularity
needs:
- version
- oneapi_jug_dev:default
variables:
BUILD_IMAGE: "oneapi_jug_dev"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- when: manual
allow_failure: true
oneapi_jug_xl:singularity:default:
extends: .singularity
needs:
- version
- oneapi_jug_xl:default
variables:
BUILD_IMAGE: "oneapi_jug_xl"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- when: manual
allow_failure: true
oneapi_jug_xl:singularity:nightly:
extends: .singularity
needs:
- version
- oneapi_jug_xl:nightly
variables:
BUILD_IMAGE: "oneapi_jug_xl"
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- when: manual
allow_failure: true
script:
- mkdir build
- singularity pull build/${BUILD_IMAGE}.sif docker://${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG}
jug_dev:singularity:default: jug_dev:singularity:default:
extends: .singularity extends: .singularity
needs: needs:
...@@ -595,11 +442,10 @@ cleanup: ...@@ -595,11 +442,10 @@ cleanup:
script: script:
## remove the pipeline specific export from eicweb if needed ## remove the pipeline specific export from eicweb if needed
- echo "Cleaning up pipeline specific docker tags if needed" - echo "Cleaning up pipeline specific docker tags if needed"
- ./gitlab-ci/cleanup_registry.sh -i debian_base -r 66 ${INTERNAL_TAG} - ./gitlab-ci/cleanup_registry.sh -i debian_testing_base -r 66 ${INTERNAL_TAG}
- ./gitlab-ci/cleanup_registry.sh -i jug_dev -r 68 ${INTERNAL_TAG} - ./gitlab-ci/cleanup_registry.sh -i jug_dev -r 68 ${INTERNAL_TAG}
- ./gitlab-ci/cleanup_registry.sh -i jug_xl -r 69 ${INTERNAL_TAG} - ./gitlab-ci/cleanup_registry.sh -i jug_xl -r 69 ${INTERNAL_TAG}
- | - |
if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then
./gitlab-ci/cleanup_registry.sh -i jug_xl -r 69 ${NIGHTLY_TAG} ./gitlab-ci/cleanup_registry.sh -i jug_xl -r 69 ${NIGHTLY_TAG}
fi fi
#syntax=docker/dockerfile:1.2 #syntax=docker/dockerfile:1.2
ARG BASEIMAGE="amd64/debian:testing-20220822-slim" ARG BASE_IMAGE="amd64/debian:testing-20220822-slim"
ARG BUILD_IMAGE="debian_base"
# Minimal container based on Debian Testing for up-to-date packages. # Minimal container based on Debian base systems for up-to-date packages.
# Very lightweight container with a minimal build environment FROM ${BASE_IMAGE}
FROM ${BASEIMAGE}
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="debian_base" \ name="${BUILD_IMAGE}" \
march="amd64" march="amd64"
COPY bashrc /root/.bashrc COPY bashrc /root/.bashrc
...@@ -18,8 +17,6 @@ ENV CLICOLOR_FORCE=1 \ ...@@ -18,8 +17,6 @@ ENV CLICOLOR_FORCE=1 \
## Install additional packages. Remove the auto-cleanup functionality ## Install additional packages. Remove the auto-cleanup functionality
## for docker, as we're using the new buildkit cache instead. ## for docker, as we're using the new buildkit cache instead.
## We also install gitlab-runner for most recent supported debian:
## bullseye per https://docs.gitlab.com/runner/install/linux-repository.html
RUN --mount=type=cache,target=/var/cache/apt \ RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt/lists \ --mount=type=cache,target=/var/lib/apt/lists \
rm -f /etc/apt/apt.conf.d/docker-clean \ rm -f /etc/apt/apt.conf.d/docker-clean \
...@@ -30,16 +27,9 @@ RUN --mount=type=cache,target=/var/cache/apt \ ...@@ -30,16 +27,9 @@ RUN --mount=type=cache,target=/var/cache/apt \
bc \ bc \
ca-certificates \ ca-certificates \
ccache \ ccache \
clang \
clang-format \
clang-tidy \
curl \ curl \
file \ file \
build-essential \
g++ \
gcc \
gdb \ gdb \
gfortran-12 \
ghostscript \ ghostscript \
git \ git \
gnupg2 \ gnupg2 \
...@@ -50,7 +40,6 @@ RUN --mount=type=cache,target=/var/cache/apt \ ...@@ -50,7 +40,6 @@ RUN --mount=type=cache,target=/var/cache/apt \
less \ less \
libcbor-xs-perl \ libcbor-xs-perl \
libjson-xs-perl \ libjson-xs-perl \
libyaml-cpp-dev \
locales \ locales \
lua-posix \ lua-posix \
make \ make \
...@@ -63,19 +52,47 @@ RUN --mount=type=cache,target=/var/cache/apt \ ...@@ -63,19 +52,47 @@ RUN --mount=type=cache,target=/var/cache/apt \
valgrind \ valgrind \
vim-nox \ vim-nox \
wget \ wget \
&& localedef -i en_US -f UTF-8 en_US.UTF-8 \ && apt-get -yqq autoremove \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \ && localedef -i en_US -f UTF-8 en_US.UTF-8
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 \
# Install updated compilers, with support for multiple base images
## Ubuntu: latest gcc from toolchain ppa, latest stable clang
## Debian: default gcc with distribution, latest stable clang
RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt/lists \
. /etc/os-release \
&& mkdir -p /etc/apt/source.list.d \
&& if [ "${ID}" = "ubuntu" ] ; then \
echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu/ \
${VERSION_CODENAME} main" \
> /etc/apt/source.list.d/ubuntu-toolchain.list \
&& if [ "${VERSION_ID}" = "20.04" ] ; then GCC="-10" CLANG="-12" ; fi\
&& if [ "${VERSION_ID}" = "22.04" ] ; then GCC="-12" CLANG="-14" ; fi\
&& curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -\
&& echo "deb http://apt.llvm.org/${VERSION_CODENAME} \
llvm-toolchain-${VERSION_CODENAME}${CLANG} main" \
> /etc/apt/source.list.d/llvm.list \
&& apt-get -yqq update \
&& apt-get -yqq install \
gcc${GCC} g++${GCC} gfortran${GCC} \
&& apt-get -yqq install \
clang${CLANG} clang-tidy${CLANG} clang-format${CLANG} \
&& update-alternatives --install /usr/bin/gcc gcc \
/usr/bin/gcc${GCC} 100 \
&& update-alternatives --install /usr/bin/g++ g++ \
/usr/bin/g++${GCC} 100 \
&& update-alternatives --install /usr/bin/gfortran gfortran \ && update-alternatives --install /usr/bin/gfortran gfortran \
/usr/bin/gfortran-12 100 \ /usr/bin/gfortran${GCC} 100 \
&& update-alternatives --install /usr/bin/clang clang \
/usr/bin/clang${CLANG} 100 \
&& update-alternatives --install /usr/bin/clang++ clang++ \
/usr/bin/clang++${CLANG} 100 \
; else \
apt-get -yqq update \
&& apt-get -yqq install \
gcc g++ gfortran \
clang clang-tidy clang-format \
; fi \
&& apt-get -yqq autoremove \
&& gcc --version \ && gcc --version \
&& export VERSION_ID=11 \ && clang --version
&& curl -L \
"https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" \
| bash \
&& sed -i "s/bookworm/bullseye/" \
/etc/apt/sources.list.d/runner_gitlab-runner.list \
&& apt-get -yqq update \
&& apt-get -yqq install --no-install-recommends \
gitlab-runner \
&& apt-get -yqq autoremove
# 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/*
#syntax=docker/dockerfile:1.2 #syntax=docker/dockerfile:1.2
ARG DOCKER_REGISTRY="eicweb.phy.anl.gov:4567/containers/eic_container/" ARG DOCKER_REGISTRY="eicweb.phy.anl.gov:4567/containers/eic_container/"
ARG BASE_IMAGE="debian_base"
ARG INTERNAL_TAG="testing" ARG INTERNAL_TAG="testing"
## ======================================================================================== ## ========================================================================================
## STAGE1: spack builder image ## STAGE1: spack builder image
## EIC builder image with spack ## EIC builder image with spack
## ======================================================================================== ## ========================================================================================
FROM ${DOCKER_REGISTRY}debian_base:${INTERNAL_TAG} as builder FROM ${DOCKER_REGISTRY}${BASE_IMAGE}:${INTERNAL_TAG} as builder
## install some extra spack dependencies ## install some extra spack dependencies
RUN --mount=type=cache,target=/var/cache/apt \ RUN --mount=type=cache,target=/var/cache/apt \
...@@ -226,7 +227,7 @@ RUN chmod a+x /usr/local/bin/mc ...@@ -226,7 +227,7 @@ RUN chmod a+x /usr/local/bin/mc
## STAGE 3 ## STAGE 3
## Lean target image ## Lean target image
## ======================================================================================== ## ========================================================================================
FROM ${DOCKER_REGISTRY}debian_base:${INTERNAL_TAG} FROM ${DOCKER_REGISTRY}${BASE_IMAGE}:${INTERNAL_TAG}
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="jug_xl" \ name="jug_xl" \
......
#syntax=docker/dockerfile:1.2 #syntax=docker/dockerfile:1.2
ARG DOCKER_REGISTRY="eicweb.phy.anl.gov:4567/containers/eic_container/" ARG DOCKER_REGISTRY="eicweb.phy.anl.gov:4567/containers/eic_container/"
ARG BASE_IMAGE="jug_dev"
ARG INTERNAL_TAG="testing" ARG INTERNAL_TAG="testing"
ARG BASEIMAGE="jug_dev"
## ======================================================================================== ## ========================================================================================
## STAGE1: spack builder image ## STAGE1: spack builder image
## EIC builder image with spack ## EIC builder image with spack
## ======================================================================================== ## ========================================================================================
FROM ${DOCKER_REGISTRY}${BASEIMAGE}:${INTERNAL_TAG} FROM ${DOCKER_REGISTRY}${BASE_IMAGE}:${INTERNAL_TAG}
ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects" ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects"
ARG JUGGLER_VERSION="main" ARG JUGGLER_VERSION="main"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment