Skip to content

Build images for arm architecture #235

Build images for arm architecture

Build images for arm architecture #235

Workflow file for this run

name: Test Docker images
on:
pull_request:
paths:
- "Dockerfile.*"
- "dask-worker/*"
- "jupyterhub/*"
- "jupyterlab/*"
- "scripts/*"
- ".github/workflows/build-push-docker.yaml"
- ".github/workflows/test-images.yaml"
env:
DOCKER_ORG: nebari
GITHUB_SHA: ${{ github.sha }}
GPU_BASE_IMAGE: nvidia/cuda:12.2.2-base-ubuntu20.04
GPU_IMAGE_SUFFIX: gpu
BASE_IMAGE: ubuntu:20.04
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test-images:
runs-on: ubuntu-latest
strategy:
matrix:
dockerfile:
- jupyterlab
- jupyterhub
- dask-worker
processor:
- gpu
- cpu
platform:
- linux/amd64
- linux/arm64
exclude:
# excludes JupyterHub/GPU
- dockerfile: jupyterhub
processor: gpu
steps:
- name: Checkout Repository 🛎
uses: actions/checkout@v3
- name: Lint Dockerfiles 🔍
uses: jbergstroem/hadolint-gh-action@v1
with:
dockerfile: Dockerfile.${{ matrix.dockerfile }}
output_format: tty
error_level: 0
- name: "Set BASE_IMAGE and Image Suffix 📷"
if: ${{ matrix.processor == 'gpu' }}
run: |
echo "GPU Processor Matrix"
echo "BASE_IMAGE=$GPU_BASE_IMAGE" >> $GITHUB_ENV
echo "IMAGE_SUFFIX=-$GPU_IMAGE_SUFFIX" >> $GITHUB_ENV
# - name: "Build docker images 🐳"
# uses: docker/build-push-action@v3
# with:
# context: .
# file: "Dockerfile.${{ matrix.dockerfile }}"
# tags: ${{ steps.meta.outputs.tags }}
# push: false
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
# build-args: BASE_IMAGE=${{ env.BASE_IMAGE }}
# platforms: ${{ matrix.platform }}