Skip to content

build and push BrineyLab Docker images #79

build and push BrineyLab Docker images

build and push BrineyLab Docker images #79

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/kubeflow-codeserver:cache,mode=max
cache-from: type=registry,ref=brineylab/kubeflow-codeserver:cache
push: if ${{ github.event_name == 'release' }}
tags: |
brineylab/base:latest
brineylab/base:${{ 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
push: true
tags: |
brineylab/kubeflow-codeserver:latest
brineylab/kubeflow-codeserver:${{ 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
push: true
tags: |
brineylab/jupyterhub-base:latest
brineylab/jupyterhub-base:${{ github.event.release.tag_name }}
# jupyter depends on base and needs to wait to be built
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
push: true
tags: |
brineylab/jupyterhub-jupyter:latest
brineylab/jupyterhub-jupyter:${{ github.event.release.tag_name }}
brineylab/jupyter:latest
brineylab/jupyter:${{ github.event.release.tag_name }}
# datascience image 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
push: true
tags: |
brineylab/jupyterhub-datascience:latest
brineylab/jupyterhub-datascience:${{ github.event.release.tag_name }}
brineylab/datascience:latest
brineylab/datascience:${{ github.event.release.tag_name }}
# deeplearning image depends on datascience
jupyterhub-deeplearning:
runs-on: ubuntu-latest-brineylab-large
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
push: true
tags: |
brineylab/jupyterhub-deeplearning:latest
brineylab/jupyterhub-deeplearning:${{ github.event.release.tag_name }}
brineylab/deeplearning:latest
brineylab/deeplearning:${{ 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
push: true
tags: |
brineylab/kubeflow-base:latest
brineylab/kubeflow-base:${{ 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
push: true
tags: |
brineylab/kubeflow-python:latest
brineylab/kubeflow-python:${{ github.event.release.tag_name }}
# jupyter depends on python and needs to wait to be built
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
push: true
tags: |
brineylab/kubeflow-jupyter:latest
brineylab/kubeflow-jupyter:${{ github.event.release.tag_name }}
# datascience image 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
push: true
tags: |
brineylab/kubeflow-datascience:latest
brineylab/kubeflow-datascience:${{ github.event.release.tag_name }}
# deeplearning image 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
push: true
tags: |
brineylab/kubeflow-deeplearning:latest
brineylab/kubeflow-deeplearning:${{ github.event.release.tag_name }}