Skip to content

Add CUDA-enabled PyTorch and TensorFlow images #44

Add CUDA-enabled PyTorch and TensorFlow images

Add CUDA-enabled PyTorch and TensorFlow images #44

Workflow file for this run

name: Build and push container images
# These triggers and image tags are designed for the following workflows:
#
# - Development: When a new commit is pushed to a branch.
#
# - Production: When a new release is tagged. The tag should be a version
# number of the form "{major}.{minor}{...}".
#
# The idea is that one pushes to a branch, tests it, then tags it.
on:
push:
branches:
- 'master'
tags:
- '[0-9]+.[0-9]+*'
paths:
- notebooks/**
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
image-name:
- htc-minimal-notebook
- htc-datascience-notebook
steps:
- name: Checkout Git repository
uses: actions/checkout@v3
- name: Set tags
id: meta
uses: docker/metadata-action@v4
with:
flavor: |
latest=false
images: |
hub.opensciencegrid.org/osg-jupyterhub/${{ matrix.image-name }}
tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value={{date 'YYYYMMDD-HHmmss'}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log into Hub
uses: docker/login-action@v1
with:
registry: hub.opensciencegrid.org
username: ${{ secrets.HUB_USERNAME }}
password: ${{ secrets.HUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v2
with:
context: notebooks/${{ matrix.image-name }}
push: true
tags: ${{ steps.meta.outputs.tags }}