Skip to content

v2024-12-03-alpha1 #109

v2024-12-03-alpha1

v2024-12-03-alpha1 #109

Workflow file for this run

name: build and push BrineyLab Docker images
on:
release:
types: [published]
workflow_dispatch:
jobs:
# ------------------
# BASE
# ------------------
base:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Delete huge unnecessary tools folder
run: |
echo "Disk space before deleting huge unnecessary tools folder:"
sudo df -h
rm -rf /opt/hostedtoolcache
echo "Disk space after deleting huge unnecessary tools folder:"
sudo df -h
- name: checkout
uses: actions/checkout@v4
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v6
with:
context: ./base
cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
push: true
tags: |
brineylab/${{ github.job }}:latest
${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# ------------------
# CODESERVER
# ------------------
# codeserver depends on python and needs to wait to be built
# kubeflow-codeserver:
# runs-on: ubuntu-latest-brineylab-large
# permissions:
# contents: read
# packages: write
# steps:
# - name: Delete huge unnecessary tools folder
# run: |
# echo "Disk space before deleting huge unnecessary tools folder:"
# sudo df -h
# rm -rf /opt/hostedtoolcache
# echo "Disk space after deleting huge unnecessary tools folder:"
# sudo df -h
# - name: checkout
# uses: actions/checkout@v4
# - name: set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: set up docker buildx
# uses: docker/setup-buildx-action@v3
# - name: login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: build and push
# uses: docker/build-push-action@v6
# with:
# context: ./kubeflow/codeserver
# cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
# cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
# push: true
# tags: |
# brineylab/${{ github.job }}:latest
# ${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# ------------------
# JUPYTERHUB
# ------------------
jupyterhub-base:
runs-on: ubuntu-latest
needs: [base]
permissions:
contents: read
packages: write
steps:
- name: Delete huge unnecessary tools folder
run: |
echo "Disk space before deleting huge unnecessary tools folder:"
sudo df -h
rm -rf /opt/hostedtoolcache
echo "Disk space after deleting huge unnecessary tools folder:"
sudo df -h
- name: checkout
uses: actions/checkout@v4
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v6
with:
context: ./jupyterhub/base
cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
push: true
tags: |
brineylab/${{ github.job }}:latest
${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# jupyter depends on base
jupyterhub-jupyter:
runs-on: ubuntu-latest
needs: [jupyterhub-base]
permissions:
contents: read
packages: write
steps:
- name: Delete huge unnecessary tools folder
run: |
echo "Disk space before deleting huge unnecessary tools folder:"
sudo df -h
rm -rf /opt/hostedtoolcache
echo "Disk space after deleting huge unnecessary tools folder:"
sudo df -h
- name: checkout
uses: actions/checkout@v4
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v6
with:
context: ./jupyterhub/jupyter
cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
push: true
tags: |
brineylab/${{ github.job }}:latest
${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# datascience depends on jupyter
jupyterhub-datascience:
runs-on: ubuntu-latest-brineylab-large
needs: [jupyterhub-jupyter]
permissions:
contents: read
packages: write
steps:
- name: Delete huge unnecessary tools folder
run: |
echo "Disk space before deleting huge unnecessary tools folder:"
sudo df -h
rm -rf /opt/hostedtoolcache
echo "Disk space after deleting huge unnecessary tools folder:"
sudo df -h
- name: checkout
uses: actions/checkout@v4
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v6
with:
context: ./jupyterhub/datascience
cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
push: true
tags: |
brineylab/${{ github.job }}:latest
${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# deeplearning depends on datascience
jupyterhub-deeplearning:
runs-on: ubuntu-latest-brineylab-xlarge
needs: [jupyterhub-datascience]
permissions:
contents: read
packages: write
steps:
- name: Delete huge unnecessary tools folder
run: |
echo "Disk space before deleting huge unnecessary tools folder:"
sudo df -h
rm -rf /opt/hostedtoolcache
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "Disk space after deleting huge unnecessary tools folder:"
sudo df -h
- name: checkout
uses: actions/checkout@v4
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v6
with:
context: ./jupyterhub/deeplearning
cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
push: true
tags: |
brineylab/${{ github.job }}:latest
${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# ------------------
# KUBEFLOW
# ------------------
# kubeflow-base:
# runs-on: ubuntu-latest
# needs: [base]
# permissions:
# contents: read
# packages: write
# steps:
# - name: Delete huge unnecessary tools folder
# run: |
# echo "Disk space before deleting huge unnecessary tools folder:"
# sudo df -h
# rm -rf /opt/hostedtoolcache
# echo "Disk space after deleting huge unnecessary tools folder:"
# sudo df -h
# - name: checkout
# uses: actions/checkout@v4
# - name: set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: set up docker buildx
# uses: docker/setup-buildx-action@v3
# - name: login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: build and push
# uses: docker/build-push-action@v6
# with:
# context: ./kubeflow/base
# cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
# cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
# push: true
# tags: |
# brineylab/${{ github.job }}:latest
# ${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# python depends on base and needs to wait to be built
# kubeflow-python:
# runs-on: ubuntu-latest
# needs: [kubeflow-base]
# permissions:
# contents: read
# packages: write
# steps:
# - name: Delete huge unnecessary tools folder
# run: |
# echo "Disk space before deleting huge unnecessary tools folder:"
# sudo df -h
# rm -rf /opt/hostedtoolcache
# echo "Disk space after deleting huge unnecessary tools folder:"
# sudo df -h
# - name: checkout
# uses: actions/checkout@v4
# - name: set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: set up docker buildx
# uses: docker/setup-buildx-action@v3
# - name: login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: build and push
# uses: docker/build-push-action@v6
# with:
# context: ./kubeflow/python
# cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
# cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
# push: true
# tags: |
# brineylab/${{ github.job }}:latest
# ${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# jupyter depends on python
# kubeflow-jupyter:
# runs-on: ubuntu-latest
# needs: [kubeflow-python]
# permissions:
# contents: read
# packages: write
# steps:
# - name: Delete huge unnecessary tools folder
# run: |
# echo "Disk space before deleting huge unnecessary tools folder:"
# sudo df -h
# rm -rf /opt/hostedtoolcache
# echo "Disk space after deleting huge unnecessary tools folder:"
# sudo df -h
# - name: checkout
# uses: actions/checkout@v4
# - name: set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: set up docker buildx
# uses: docker/setup-buildx-action@v3
# - name: login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: build and push
# uses: docker/build-push-action@v6
# with:
# context: ./kubeflow/jupyter
# cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
# cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
# push: true
# tags: |
# brineylab/${{ github.job }}:latest
# ${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# datascience depends on jupyter
# kubeflow-datascience:
# runs-on: ubuntu-latest-brineylab-large
# needs: [kubeflow-jupyter]
# permissions:
# contents: read
# packages: write
# steps:
# - name: Delete huge unnecessary tools folder
# run: |
# echo "Disk space before deleting huge unnecessary tools folder:"
# sudo df -h
# rm -rf /opt/hostedtoolcache
# echo "Disk space after deleting huge unnecessary tools folder:"
# sudo df -h
# - name: checkout
# uses: actions/checkout@v4
# - name: set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: set up docker buildx
# uses: docker/setup-buildx-action@v3
# - name: login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: build and push
# uses: docker/build-push-action@v6
# with:
# context: ./kubeflow/datascience
# cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
# cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
# push: true
# tags: |
# brineylab/${{ github.job }}:latest
# ${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}
# deeplearning depends on datascience
# kubeflow-deeplearning:
# runs-on: ubuntu-latest-brineylab-large
# needs: [kubeflow-datascience]
# permissions:
# contents: read
# packages: write
# steps:
# - name: Delete huge unnecessary tools folder
# run: |
# echo "Disk space before deleting huge unnecessary tools folder:"
# sudo df -h
# rm -rf /opt/hostedtoolcache
# echo "Disk space after deleting huge unnecessary tools folder:"
# sudo df -h
# - name: checkout
# uses: actions/checkout@v4
# - name: set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: set up docker buildx
# uses: docker/setup-buildx-action@v3
# - name: login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: build and push
# uses: docker/build-push-action@v6
# with:
# context: ./kubeflow/deeplearning
# cache-to: type=registry,ref=brineylab/${{ github.job }}:cache,mode=max
# cache-from: type=registry,ref=brineylab/${{ github.job }}:cache
# push: true
# tags: |
# brineylab/${{ github.job }}:latest
# ${{ github.event_name == 'release' && format('brineylab/{0}:{1}', github.job, github.event.release.tag_name) || '' }}