Sign inSign up

saliei/ska-sdp-spack

By saliei

•Updated almost 2 years ago

Test image including Spack installation with ska-sdp-spack repo added and test packages installed.

Image
Data science
0

4.5K

saliei/ska-sdp-spack repository overview

This is a test spack image with packages, such as dp3 installed using the ska-sdp-spack⁠ packages.

This is meant to be used in a CI pipeline for testing purposes and is not yet an stable release.

FROM artefact.skao.int/ska-build-python:0.1.1

SHELL ["/bin/bash", "-c"]

ARG SPACK_BRANCH=releases/v0.23
ARG SPACK_ROOT=/spack
ARG SPACK_ENV_NAME=sdp

ARG SPACK_CACHE_VERSION=v0.23.0
ARG SPACK_E4S_MIRROR=https://cache.e4s.io/24.11
ARG SPACK_E4S_MIRROR_NAME=E4S

ARG SPACK_ADD_CMD="spack -e ${SPACK_ENV_NAME} add"
ARG SPACK_CONCRETIZE_CMD="spack -e ${SPACK_ENV_NAME} concretize"
ARG SPACK_INSTALL_CMD="spack -e ${SPACK_ENV_NAME} install --fail-fast"
ARG TARGET="x86_64_v2"

WORKDIR /

RUN apt update -y && apt upgrade -y
RUN apt install -y gcc g++ gfortran python3 git zip unzip 

RUN git clone --depth=2 --branch=$SPACK_BRANCH https://github.com/spack/spack.git $SPACK_ROOT
ENV PATH="${PATH}:/spack/bin"
ENV SPACK_ROOT=$SPACK_ROOT
RUN spack compiler find

RUN spack mirror add $SPACK_CACHE_VERSION https://binaries.spack.io/$SPACK_CACHE_VERSION
RUN spack mirror add $SPACK_E4S_MIRROR_NAME $SPACK_E4S_MIRROR
RUN spack buildcache keys --install --trust

RUN git clone https://gitlab.com/ska-telescope/sdp/ska-sdp-spack.git $SPACK_ROOT/var/spack/repos/ska-sdp-spack
RUN spack repo add $SPACK_ROOT/var/spack/repos/ska-sdp-spack

RUN spack env create $SPACK_ENV_NAME
# COPY ./spack.yaml $SPACK_ROOT/var/spack/environments/$SPACK_ENV_NAME/spack.yaml
# NOTE: Here we avoid a for loop to make each package a separate container layer.
# TODO: Add packages as they become stable.
RUN $SPACK_ADD_CMD dp3 target=$TARGET

RUN $SPACK_CONCRETIZE_CMD 
RUN $SPACK_INSTALL_CMD

Tag summary

Content type

Image

Digest

sha256:7b8934b8e…

Size

1.1 GB

Last updated

almost 2 years ago

docker pull saliei/ska-sdp-spack:0.5.0