Update Dask version to 2024.10.0 #491
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: Docker build | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
env: | |
release: "2024.10.0" | |
defaultpython: "3.10" | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.10", "3.11", "3.12"] | |
image: | |
- tag: "daskdev/dask" | |
context: "./base" | |
- tag: "ghcr.io/dask/dask" | |
context: "./base" | |
- tag: "daskdev/dask-notebook" | |
context: "./notebook" | |
- tag: "ghcr.io/dask/dask-notebook" | |
context: "./notebook" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
with: | |
driver: docker | |
- name: Install Container Canary | |
run: | | |
LATEST_RELEASE=$(curl --retry 6 --retry-delay 10 -s https://api.github.com/repos/NVIDIA/container-canary/releases/latest | jq -r ".assets[] | select(.name | test(\"canary_linux_amd64$\")) | .browser_download_url") | |
curl --retry 6 --retry-delay 10 -sSL $LATEST_RELEASE > /usr/local/bin/canary | |
chmod +x /usr/local/bin/canary | |
canary version | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
if: github.repository == 'dask/dask-docker' && github.event_name == 'push' | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
if: github.repository == 'dask/dask-docker' && github.event_name == 'push' | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate tags | |
id: tags | |
env: | |
image: ${{ matrix.image.tag }} | |
python: ${{ matrix.python }} | |
stable: ${{ startsWith(github.ref, 'refs/tags') }} | |
run: | | |
if [ "$stable" == "true" ]; then | |
tag="${image}:${release}-py${python}" | |
tags=${image}:latest-py${python},$tag | |
if [ "$python" == "$defaultpython" ]; then | |
tags=${image}:latest,${image}:${release},$tags | |
fi | |
else | |
tag="${image}:dev-py${python}" | |
tags=$tag | |
if [ "$python" == "$defaultpython" ]; then | |
tags=${image}:dev,$tags | |
fi | |
fi | |
echo "tags=${tags}" >> $GITHUB_OUTPUT | |
echo "tag=${tag}" >> $GITHUB_OUTPUT | |
- name: Checkout upstream Jupyter Lab image repo | |
uses: actions/checkout@v2 | |
if: contains(matrix.image.tag, 'dask-notebook') | |
with: | |
repository: jupyter/docker-stacks | |
ref: main | |
path: docker-stacks | |
- name: Build upstream Jupyter Lab image | |
uses: docker/build-push-action@v2 | |
if: contains(matrix.image.tag, 'dask-notebook') | |
with: | |
context: ./docker-stacks/images/docker-stacks-foundation | |
push: false | |
load: true | |
platforms: linux/amd64 | |
tags: daskdev/docker-stacks-foundation:lab | |
build-args: | | |
PYTHON_VERSION=${{ matrix.python }} | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: ${{ matrix.image.context }} | |
push: ${{ github.repository == 'dask/dask-docker' && github.event_name == 'push' }} | |
platforms: linux/amd64 | |
tags: ${{ steps.tags.outputs.tags }} | |
build-args: | | |
python=${{ matrix.python }} | |
release=${{ env.release }} | |
base=daskdev | |
- name: Validate Jupyter Lab image for Binder | |
if: contains(matrix.image.tag, 'dask-notebook') | |
run: canary validate --file https://github.com/NVIDIA/container-canary/raw/main/examples/binder.yaml ${{ steps.tags.outputs.tag }} | |
- name: Validate Jupyter Lab image for Kubeflow | |
if: contains(matrix.image.tag, 'dask-notebook') | |
run: canary validate --file https://github.com/NVIDIA/container-canary/raw/main/examples/kubeflow.yaml ${{ steps.tags.outputs.tag }} | |
- name: Report | |
run: echo Built ${{ steps.tags.outputs.tags }} |