Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 37 additions & 32 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,63 @@ on:
branches:
- main
paths:
- 'images/Dockerfile*'
- 'images/**'
- '.github/workflows/docker-build.yaml'
pull_request:
paths:
- 'images/Dockerfile*'
- 'images/**'
- '.github/workflows/docker-build.yaml'
workflow_dispatch:

jobs:
docker-build:
build-dandi:
runs-on: ubuntu-latest

strategy:
matrix:
include:
- tag: latest
dockerfile: Dockerfile
- tag: latest-openscope
dockerfile: Dockerfile.openscope
- tag: latest-allensdk
dockerfile: Dockerfile.allensdk
- tag: latest-gpu
dockerfile: Dockerfile.gpu
- tag: latest-gpu-allensdk
dockerfile: Dockerfile.gpu.allensdk
- tag: latest-matlab
dockerfile: Dockerfile.matlab

- tag: latest-nebari
build-args: ""
- tag: latest-nebari-gpu
build-args: "BASE_IMAGE=quay.io/nebari/nebari-jupyterlab-gpu:2024.11.1"

Copilot AI Dec 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Nebari base image version (2024.11.1) is duplicated in both the Dockerfile default and the workflow build-args for the GPU variant. This creates a maintenance burden and risk of version drift. Consider managing the version in one place only, preferably using the ARG in the Dockerfile and letting the workflow override only when necessary.

Suggested change
build-args: "BASE_IMAGE=quay.io/nebari/nebari-jupyterlab-gpu:2024.11.1"
build-args: "BASE_IMAGE=quay.io/nebari/nebari-jupyterlab-gpu"

Copilot uses AI. Check for mistakes.
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Log in to Docker Hub
- uses: docker/login-action@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_DANDIHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_DANDIHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- uses: docker/build-push-action@v6
with:
context: ./images/dandi
file: ./images/dandi/Dockerfile
build-args: ${{ matrix.build-args }}
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: dandiarchive/dandihub:${{ matrix.tag }}
cache-from: type=registry,ref=dandiarchive/dandihub:${{ matrix.tag }}
cache-to: type=inline

build-matlab:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: docker/login-action@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
username: ${{ secrets.DOCKERHUB_DANDIHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_DANDIHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v3

- name: Build and conditionally push Docker Image
uses: docker/build-push-action@v6
- uses: docker/build-push-action@v6
with:
context: ./images
file: ./images/${{ matrix.dockerfile }}
context: ./images/matlab
file: ./images/matlab/Dockerfile
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
tags: |
${{ secrets.DOCKERHUB_DANDIHUB_USERNAME }}/dandihub:${{ matrix.tag }}
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_DANDIHUB_USERNAME }}/dandihub:${{ matrix.tag }}
tags: dandiarchive/dandihub:latest-matlab
cache-from: type=registry,ref=dandiarchive/dandihub:latest-matlab
cache-to: type=inline
66 changes: 0 additions & 66 deletions images/Dockerfile

This file was deleted.

72 changes: 0 additions & 72 deletions images/Dockerfile.allensdk

This file was deleted.

68 changes: 0 additions & 68 deletions images/Dockerfile.gpu

This file was deleted.

75 changes: 0 additions & 75 deletions images/Dockerfile.gpu.allensdk

This file was deleted.

Loading