Skip to content

Build base compilers docker images #59

Build base compilers docker images

Build base compilers docker images #59

Workflow file for this run

name: Build base compilers docker images
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
paths:
- '/docker/Dockerfile.nvidia'
- '/docker/Dockerfile.cpu'
- '/docker/Dockerfile.amd'
workflow_dispatch:
inputs:
tags:
description: 'Build compiler bases'
schedule:
# Run once a week
- cron: "0 13 * * 1"
jobs:
#######################################################
############## Basic gcc CPU ##########################
#######################################################
deploy-cpu-bases:
name: "cpu-base"
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
steps:
- name: Checkout devito
uses: actions/checkout@v3
- name: Check event name
run: echo ${{ github.event_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: cleanup
run: docker system prune -a -f
- name: GCC image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.cpu'
push: true
target: 'gcc'
build-args: 'arch=gcc'
tags: 'devitocodes/bases:cpu-gcc'
#######################################################
############## Intel OneApi CPU #######################
#######################################################
deploy-oneapi-bases:
name: "oneapi-base"
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
steps:
- name: Checkout devito
uses: actions/checkout@v3
- name: Check event name
run: echo ${{ github.event_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: cleanup
run: docker system prune -a -f
- name: ICX image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.cpu'
push: true
target: 'icx'
build-args: 'arch=icx'
tags: 'devitocodes/bases:cpu-icx'
#######################################################
################### Nvidia nvhpc ######################
#######################################################
deploy-nvidia-bases:
name: "nvidia-bases"
runs-on: ["self-hosted", "nvidiagpu"]
env:
DOCKER_BUILDKIT: "1"
steps:
- name: Checkout devito
uses: actions/checkout@v3
- name: Check event name
run: echo ${{ github.event_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: cleanup
run: docker system prune -a -f
- name: NVC image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.nvidia'
push: true
target: 'nvc'
build-args: 'arch=nvc'
tags: 'devitocodes/bases:nvidia-nvc'
- name: NVCC image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.nvidia'
push: true
target: 'nvcc'
build-args: 'arch=nvcc'
tags: 'devitocodes/bases:nvidia-nvcc'
- name: NVC host image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.nvidia'
push: true
target: 'nvc-host'
build-args: 'arch=nvc-host'
tags: 'devitocodes/bases:cpu-nvc'
#######################################################
##################### AMD #############################
#######################################################
deploy-amd-bases:
name: "amd-base"
runs-on: ["self-hosted", "amdgpu"]
env:
DOCKER_BUILDKIT: "1"
steps:
- name: Checkout devito
uses: actions/checkout@v3
- name: Check event name
run: echo ${{ github.event_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: cleanup
run: docker system prune -a -f
- name: AMD image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.amd'
push: true
target: 'amdclang'
tags: devitocodes/bases:amd
- name: AMD HIP image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.amd'
push: true
target: 'hip'
build-args: |
arch=hip
tags: devitocodes/bases:amd-hip