Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
containers
eic_container
Commits
c4310b7a
Commit
c4310b7a
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: spack arch map, key on docker TARGETPLATFORM
parent
a96c38ea
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!457
feat: spack arch map, key on docker TARGETPLATFORM
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+19
-12
19 additions, 12 deletions
.gitlab-ci.yml
containers/jug/dev.Dockerfile
+14
-7
14 additions, 7 deletions
containers/jug/dev.Dockerfile
with
33 additions
and
19 deletions
.gitlab-ci.yml
+
19
−
12
View file @
c4310b7a
...
...
@@ -194,14 +194,19 @@ base:
matrix
:
-
BASE_IMAGE
:
amd64/debian:testing-20220822-slim
BUILD_IMAGE
:
amd64_debian_testing_base
PLATFORM
:
linux/amd64
-
BASE_IMAGE
:
amd64/ubuntu:20.04
BUILD_IMAGE
:
amd64_ubuntu_base
PLATFORM
:
linux/amd64
-
BASE_IMAGE
:
intel/oneapi-hpckit:2022.3.0-devel-ubuntu20.04
BUILD_IMAGE
:
oneapi_base
PLATFORM
:
linux/amd64
-
BASE_IMAGE
:
nvidia/cuda:11.8.0-devel-ubuntu20.04
BUILD_IMAGE
:
cuda_base
PLATFORM
:
linux/amd64
-
BASE_IMAGE
:
arm64v8/debian:testing-20220822-slim
BUILD_IMAGE
:
arm64v8_debian_testing_base
PLATFORM
:
linux/arm64/v8
# - BASE_IMAGE: debian:testing-20220822-slim
# BUILD_IMAGE: debian_testing_base_multiarch
# PLATFORM: linux/amd64,linux/arm64/v8
...
...
@@ -225,16 +230,16 @@ jug_dev:default:
matrix
:
-
BASE_IMAGE
:
amd64_debian_testing_base
BUILD_IMAGE
:
jug_dev
SPACK_ARCH
:
x86_
64
PLATFORM
:
linux/amd
64
-
BASE_IMAGE
:
arm64v8_debian_testing_base
BUILD_IMAGE
:
jug_dev_arm64v8
SPACK_ARCH
:
aarch64
PLATFORM
:
linux/arm64/v8
# - BASE_IMAGE: oneapi_base
# BUILD_IMAGE: jug_dev_oneapi
#
SPACK_ARCH: x86_
64
#
PLATFORM: linux/amd
64
# - BASE_IMAGE: cuda_base_new
# BUILD_IMAGE: jug_dev_cuda
#
SPACK_ARCH: x86_
64
#
PLATFORM: linux/amd
64
extends
:
.build
stage
:
jug
needs
:
...
...
@@ -260,8 +265,8 @@ jug_dev:default:
-t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:builder-${INTERNAL_TAG}
--target=builder
-f containers/jug/dev.Dockerfile
${PLATFORM:+--platform ${PLATFORM}}
--build-arg BASE_IMAGE="${BASE_IMAGE}"
--build-arg SPACK_ARCH="${SPACK_ARCH}"
--build-arg SPACK_ORGREPO="${SPACK_ORGREPO}"
--build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
...
...
@@ -277,8 +282,8 @@ jug_dev:default:
## now build our image
-
docker buildx build --load -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG} ${CACHE_FLAG}
-f containers/jug/dev.Dockerfile
${PLATFORM:+--platform ${PLATFORM}}
--build-arg BASE_IMAGE="${BASE_IMAGE}"
--build-arg SPACK_ARCH="${SPACK_ARCH}"
--build-arg SPACK_ORGREPO="${SPACK_ORGREPO}"
--build-arg SPACK_VERSION="${SPACK_VERSION}"
--build-arg SPACK_CHERRYPICKS="${SPACK_CHERRYPICKS}"
...
...
@@ -316,13 +321,13 @@ jug_xl:default:
matrix
:
-
BASE_IMAGE
:
jug_dev
BUILD_IMAGE
:
jug_xl
DOCKER_ARCH
:
amd64
PLATFORM
:
linux/
amd64
-
BASE_IMAGE
:
jug_dev_arm64v8
BUILD_IMAGE
:
jug_xl_arm64v8
DOCKER_ARCH
:
arm64v8
PLATFORM
:
linux/
arm64
/
v8
# - BASE_IMAGE: jug_dev_oneapi
# BUILD_IMAGE: jug_xl_oneapi
#
DOCKER_ARCH:
amd64
#
PLATFORM: linux/
amd64
extends
:
.build
stage
:
jug
needs
:
...
...
@@ -333,6 +338,7 @@ jug_xl:default:
-
cp detectors.yaml containers/jug
-
docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
-f containers/jug/xl.Dockerfile
${PLATFORM:+--platform ${PLATFORM}}
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUGGLER_VERSION=${JUGGLER_VERSION}
...
...
@@ -345,13 +351,13 @@ jug_xl:nightly:
matrix
:
-
BASE_IMAGE
:
jug_dev
BUILD_IMAGE
:
jug_xl
DOCKER_ARCH
:
amd64
PLATFORM
:
linux/
amd64
-
BASE_IMAGE
:
jug_dev_arm64v8
BUILD_IMAGE
:
jug_xl_arm64v8
DOCKER_ARCH
:
arm64v8
PLATFORM
:
linux/
arm64
/
v8
# - BASE_IMAGE: jug_dev_oneapi
# BUILD_IMAGE: jug_xl_oneapi
#
DOCKER_ARCH:
amd64
#
PLATFORM: linux/
amd64
extends
:
.build
stage
:
jug
rules
:
...
...
@@ -368,6 +374,7 @@ jug_xl:nightly:
-
cp detectors.yaml containers/jug
-
docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG}
-f containers/jug/xl.Dockerfile
${PLATFORM:+--platform ${PLATFORM}}
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg JUG_VERSION=nightly-$(date +%Y-%m-%d_%H-%M-%S)-${INTERNAL_TAG}-$(git rev-parse HEAD)
...
...
This diff is collapsed.
Click to expand it.
containers/jug/dev.Dockerfile
+
14
−
7
View file @
c4310b7a
...
...
@@ -8,6 +8,7 @@ ARG INTERNAL_TAG="testing"
## EIC builder image with spack
## ========================================================================================
FROM
${DOCKER_REGISTRY}${BASE_IMAGE}:${INTERNAL_TAG}
as
builder
ARG
TARGETPLATFORM
## install some extra spack dependencies
RUN
--mount
=
type
=
cache,target
=
/var/cache/apt
\
...
...
@@ -23,7 +24,6 @@ RUN --mount=type=cache,target=/var/cache/apt \
## Setup spack
## parts:
ARG
SPACK_ARCH="x86_64"
ENV
SPACK_ROOT=/opt/spack
ARG
SPACK_ORGREPO="spack/spack"
ARG
SPACK_VERSION="develop"
...
...
@@ -39,17 +39,22 @@ RUN git clone https://github.com/${SPACK_ORGREPO}.git ${SPACK_ROOT} \
&&
ln
-s
$SPACK_ROOT
/share/spack/docker/entrypoint.bash
\
/usr/sbin/interactive-shell
\
&&
ln
-s
$SPACK_ROOT
/share/spack/docker/entrypoint.bash
\
/usr/sbin/spack-env
\
&&
export
PATH
=
${
PATH
}
:
${
SPACK_ROOT
}
/bin
\
&&
spack config
--scope
site add
"packages:all:require:arch=
${
SPACK_ARCH
}
"
\
/usr/sbin/spack-env
SHELL
["docker-shell"]
RUN
declare
-A
arch
=(
\
[
"linux/amd64"
]=
"x86_64"
\
[
"linux/arm64"
]=
"aarch64"
\
)
\
&&
arch
=
${
arch
[
${
TARGETPLATFORM
}
]
}
\
&&
spack config
--scope
site add
"packages:all:require:arch=
${
arch
}
"
\
&&
spack config blame packages
\
&&
spack config
--scope
site add
"config:suppress_gpg_warnings:true"
\
&&
spack config
--scope
site add
"config:build_jobs:64"
\
&&
spack config
--scope
site add
"config:install_tree:root:/opt/software"
\
&&
spack config blame config
SHELL
["docker-shell"]
## Setup spack buildcache mirrors, including an internal
## spack mirror using the docker build cache, and
## a backup mirror on the internal B010 network
...
...
@@ -211,6 +216,7 @@ COPY profile.d/z11_jug_env.sh /etc/profile.d
COPY
singularity.d /.singularity.d
## Add minio client into /usr/local/bin
## FIXME: This should download .../linux-arm64/mc for arm64.
ADD
https://dl.min.io/client/mc/release/linux-amd64/mc /usr/local/bin
RUN
chmod
a+x /usr/local/bin/mc
...
...
@@ -219,10 +225,11 @@ RUN chmod a+x /usr/local/bin/mc
## Lean target image
## ========================================================================================
FROM
${DOCKER_REGISTRY}${BASE_IMAGE}:${INTERNAL_TAG}
ARG
TARGETPLATFORM
LABEL
maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="jug_xl" \
march="
amd64
"
march="
$TARGETPLATFORM
"
## copy over everything we need from staging in a single layer :-)
RUN
--mount
=
from
=
staging,target
=
/staging
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment