Skip to content

Commit

Permalink
Add arg BASE_IMAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
edopao committed Sep 2, 2024
1 parent b8bb65d commit 6bb4187
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion ci/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,22 @@ variables:
DOCKERFILE: ci/docker/base.Dockerfile
# change to 'always' if you want to rebuild, even if target tag exists already (if-not-exists is the default, i.e. we could also skip the variable)
CSCS_REBUILD_POLICY: if-not-exists
DOCKER_BUILD_ARGS: '["ARCH=$ARCH", "HPC_SDK_VERSION=$HPC_SDK_VERSION", "HPC_SDK_NAME=$HPC_SDK_NAME", "CUPY_PACKAGE=$CUPY_PACKAGE", "PYVERSION=$PYVERSION", "CI_PROJECT_DIR=$CI_PROJECT_DIR"]'
DOCKER_BUILD_ARGS: '["ARCH=$ARCH", "BASE_IMAGE=$BASE_IMAGE", "HPC_SDK_VERSION=$HPC_SDK_VERSION", "HPC_SDK_NAME=$HPC_SDK_NAME", "CUPY_PACKAGE=$CUPY_PACKAGE", "PYVERSION=$PYVERSION", "CI_PROJECT_DIR=$CI_PROJECT_DIR"]'
build_baseimage_x86_64:
extends: [.container-builder-cscs-zen2, .build_baseimage]
variables:
# x86_64 test target is Daint-gpu through Sarus:
# the base image does not need to provide the cuda runtime
BASE_IMAGE: "ubuntu:20.04"
HPC_SDK_VERSION: 22.11
HPC_SDK_NAME: "nvhpc_2022_2211_Linux_${ARCH}_cuda_11.8"
CUPY_PACKAGE: cupy-cuda11x
build_baseimage_aarch64:
extends: [.container-builder-cscs-gh200, .build_baseimage]
variables:
# aarm64 test target is Todi through Container Engine:
# the base image should provide the cuda runtime, therefore we use the cuda base image
BASE_IMAGE: "docker.io/nvidia/cuda:12.4.1-base-ubuntu20.04"
HPC_SDK_VERSION: 24.5
HPC_SDK_NAME: "nvhpc_2024_245_Linux_${ARCH}_cuda_12.4"
CUPY_PACKAGE: cupy-cuda12x
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:20.04
ARG BASE_IMAGE=ubuntu:20.04
FROM ${BASE_IMAGE}

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
Expand Down

0 comments on commit 6bb4187

Please sign in to comment.