Skip to content

Commit

Permalink
Update containers and deploy at LLNL
Browse files Browse the repository at this point in the history
- Fix #81, #86
  • Loading branch information
ggeorgakoudis committed Sep 19, 2024
1 parent c15e5a7 commit 94b24d0
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 21 deletions.
18 changes: 9 additions & 9 deletions .github/containers/x86_64-broadwell-gcc11.2.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
FROM centos:7 AS base
FROM almalinux:8 AS base
MAINTAINER Giorgis Georgakoudis <[email protected]>
RUN \
yum install -y dnf &&\
dnf install -y epel-release &&\
dnf group install -y "Development Tools" &&\
dnf install -y curl findutils gcc-gfortran gnupg2 hostname iproute redhat-lsb-core python3 python3-pip python3-setuptools unzip python-boto3 centos-release-scl-rh &&\
dnf install -y devtoolset-11 environment-modules &&\
dnf install -y git gcc-toolset-11 environment-modules &&\
dnf upgrade -y
COPY repo repo
RUN \
mkdir -p ams-spack-env
COPY spack.yaml ams-spack-env/spack.yaml


FROM base AS setup-spack-env
RUN \
source /etc/profile &&\
mkdir -p /usr/share/Modules/modulefiles/gcc &&\
/usr/share/Modules/bin/createmodule.sh /opt/rh/devtoolset-11/enable > /usr/share/Modules/modulefiles/gcc/11.2.1 &&\
/usr/share/Modules/bin/createmodule.sh /opt/rh/gcc-toolset-11/enable > /usr/share/Modules/modulefiles/gcc/11.2.1 &&\
module load gcc/11.2.1 &&\
git clone --depth 1 --branch releases/v0.20 https://github.com/spack/spack.git &&\
source spack/share/spack/setup-env.sh &&\
spack compiler find &&\
spack compiler rm gcc@4.8.5 &&\
spack compiler rm [email protected].0 &&\
sed -i "s/modules.*/modules: [gcc\/11.2.1]/" ~/.spack/linux/compilers.yaml

FROM setup-spack-env AS install-spack-env
RUN \
source /etc/profile &&\
module load gcc/11.2.1 &&\
source spack/share/spack/setup-env.sh &&\
spack env activate -p ams-spack-env &&\
spack install &&\
spack clean --all
spack install --fail-fast &&\
spack clean --all &&\
dnf clean all

7 changes: 4 additions & 3 deletions .github/containers/x86_64-broadwell-gcc11.2.1/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ spack:
- flux-sched
- py-pika
- amqp-cpp +tcp
- adiak
#- adiak
- nlohmann-json
view: local
concretizer:
unify: true
Expand Down Expand Up @@ -69,6 +70,6 @@ spack:
require: '@0.28'
py-pika:
require: '@1.3.1'
adiak:
require: '@0.4.0+shared+mpi'
#adiak:
# require: '@0.4.0+shared+mpi'

11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@ name: CI

on:
# Triggers the workflow on push or pull request events but only for the "develop" branch
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

workflow_dispatch:

jobs:
build-run-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/ggeorgakoudis/ams-ci-test-ruby-centos7

# Temporary fix for https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true # Allow using Node16 actions
container: ghcr.io/LLNL/ams-ci-almalinux8:latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down Expand Up @@ -256,7 +249,7 @@ jobs:
build-cuda-tests:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: ghcr.io/ggeorgakoudis/ams-ci-cuda11.6.1:latest
container: ghcr.io/LLNL/ams-ci-cuda11.6.1:latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/create-containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy containers

on:
workflow_dispatch:

jobs:
deploy-containers:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push almalinux8 container
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: "{{defaultContext}}:.github/containers/x86_64-broadwell-gcc11.2.1"
push: true
provenance: false
tags: ghcr.io/llnl/ams-ci-almalinux8:latest

- name: Build and push cuda container
uses: docker/build-push-action@v6
with:
platforms: linux/amd64
context: "{{defaultContext}}:.github/containers/x86_64-broadwell-cuda11.6.1"
push: true
provenance: false
tags: ghcr.io/llnl/ams-ci-cuda11.6.1:latest

0 comments on commit 94b24d0

Please sign in to comment.