Add Python 3.9 env #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create and publish Docker images | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
release: | |
types: [published] | |
jobs: | |
push_to_registry: | |
name: Build and push Docker image to GitHub Packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: update-base | |
run: ./update_base.sh | |
shell: bash | |
- name: Add SHORT_SHA env property with commit short sha | |
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
with: | |
driver: docker # defaults to "docker-containerized" | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Intermediate images used as base images | |
- name: Build docker-stacks-foundation image | |
uses: docker/build-push-action@v2 | |
with: | |
build-args: | | |
ROOT_CONTAINER=nvidia/cuda:11.7.0-cudnn8-runtime-ubuntu22.04 | |
context: ./docker-stacks-foundation | |
push: false | |
tags: docker-stacks-foundation | |
- name: Build base-notebook image | |
uses: docker/build-push-action@v2 | |
with: | |
build-args: | | |
BASE_CONTAINER=docker-stacks-foundation | |
context: ./base-notebook | |
push: false | |
tags: base-notebook | |
- name: Build minimal-notebook image | |
uses: docker/build-push-action@v2 | |
with: | |
build-args: | | |
BASE_CONTAINER=base-notebook | |
context: ./minimal-notebook | |
push: false | |
tags: minimal-notebook | |
# Published pipeline images | |
# CPU ONLY IMAGE - based on default jupyterhub docker stacks | |
- name: Extract metadata for pipeline-base | |
id: meta-base | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
ghcr.io/auscalabledronecloud/pipeline-base | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha | |
${{ env.SHORT_SHA }}-${{ github.run_number }} | |
- name: Build and push pipeline-base image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./base | |
push: true | |
tags: | | |
ghcr.io/auscalabledronecloud/pipeline-base:latest | |
${{ steps.meta-base.outputs.tags }} | |
labels: ${{ steps.meta-base.outputs.labels }} | |
- name: Extract metadata for pipeline-gpu | |
id: meta-gpu | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
ghcr.io/auscalabledronecloud/pipeline-gpu | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha | |
${{ env.SHORT_SHA }}-${{ github.run_number }} | |
- name: Build and push pipeline-gpu image | |
uses: docker/build-push-action@v2 | |
with: | |
build-args: | | |
BASE_CONTAINER=minimal-notebook | |
context: ./base | |
push: true | |
tags: | | |
ghcr.io/auscalabledronecloud/pipeline-gpu:latest | |
${{ steps.meta-gpu.outputs.tags }} | |
labels: ${{ steps.meta-base.outputs.labels }} | |
- name: Extract metadata for pipeline-ml | |
id: meta-ml | |
uses: docker/metadata-action@v3 | |
with: | |
images: ghcr.io/auscalabledronecloud/pipeline-ml | |
tags: | | |
type=schedule | |
type=ref,event=branch | |
type=ref,event=tag | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=sha | |
${{ env.SHORT_SHA }}-${{ github.run_number }} | |
- name: Build and push pipeline-ml image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ml | |
push: true | |
tags: | | |
ghcr.io/auscalabledronecloud/pipeline-ml:latest | |
${{ steps.meta-ml.outputs.tags }} | |
labels: ${{ steps.meta-ml.outputs.labels }} |