diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 654c0834e77e481bedd0bc7fe87f88b90d010a4a..d8b22d8a2fdbde940106b944ab05ed2e9fd72aa9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -183,7 +183,7 @@ oneapi_jug_dev:default: ## Copy jug_dev files into build context - cp -r containers/jug/* containers/oneapi - docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} - -f containers/oneapi/dev.Dockerfile + -f containers/oneapi/onedev.Dockerfile containers/oneapi - !reference [.build, script] diff --git a/containers/oneapi/dev.Dockerfile b/containers/oneapi/onedev.Dockerfile similarity index 98% rename from containers/oneapi/dev.Dockerfile rename to containers/oneapi/onedev.Dockerfile index 490a03c021dd4b2cd0cbdc84a80f54888dc7907d..7dc4ccfa2d36be43cf352cdabb21f9f8926e0b28 100644 --- a/containers/oneapi/dev.Dockerfile +++ b/containers/oneapi/onedev.Dockerfile @@ -8,10 +8,8 @@ ## ======================================================================================== -ARG DOCKER_REGISTRY="eicweb.phy.anl.gov:4567/containers/eic_container/" -ARG INTERNAL_TAG="testing" -FROM intel/oneapi-hpckit:2022.1.2-devel-ubuntu18.04 as oneapi +FROM intel/oneapi-hpckit:2022.1.2-devel-ubuntu18.04 AS oneapi COPY bashrc /root/.bashrc @@ -87,7 +85,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ ## EIC builder image with spack ## ======================================================================================== -FROM oneapi as builder +FROM oneapi AS builder ## Setup spack @@ -208,7 +206,9 @@ RUN --mount=type=cache,target=/var/cache/pip \ --trusted-host pypi.org \ --trusted-host files.pythonhosted.org \ --cache-dir /var/cache/pip \ - --requirement /usr/local/etc/requirements.txt + --requirement /usr/local/etc/requirements.txt \ + --no-warn-script-location + # ^ Supress not on PATH Warnings ## Including some small fixes: ## - Somehow PODIO env isn't automatically set, @@ -238,7 +238,7 @@ WORKDIR / ## ======================================================================================== ## STAGE 3: staging image with unnecessariy packages removed and stripped binaries ## ======================================================================================== -FROM builder as staging +FROM builder AS staging RUN cd /opt/spack-environment && spack env activate . && spack gc -y # Strip all the binaries @@ -290,6 +290,8 @@ RUN chmod a+x /usr/local/bin/mc ## Lean target image ## ======================================================================================== +FROM staging AS lean + # We cannot use a new base image and copy from staging # So, remove spack and clean-up existing image RUN rm -rf $SPACK_ROOT \