From f161a029e5d9c73d0609e004820245b4bfb84bfa Mon Sep 17 00:00:00 2001 From: Arya Massarat <23412689+aryarm@users.noreply.github.com> Date: Sat, 10 Dec 2022 17:02:52 -0800 Subject: [PATCH 1/3] try docker layer caching --- .github/workflows/docker-image.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3f18ede..f54ec70 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -54,3 +54,5 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max From c649a379b5ce5a878e6efac57ee9b1d1599f99ab Mon Sep 17 00:00:00 2001 From: Arya Massarat <23412689+aryarm@users.noreply.github.com> Date: Sat, 10 Dec 2022 17:07:22 -0800 Subject: [PATCH 2/3] add buildx to github action --- .github/workflows/docker-image.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f54ec70..d43fdf9 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -33,22 +33,25 @@ jobs: uses: actions/checkout@v3 - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: prune run: docker system prune -af - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v3 with: context: . push: true From dc7b545404749ae645f207cdfdc7e382e68b27d8 Mon Sep 17 00:00:00 2001 From: Arya Massarat <23412689+aryarm@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:47:14 -0800 Subject: [PATCH 3/3] add nb_conda_kernels to base env resolves ucsd-ets/cmm262-notebook#10 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e232ba8..a5598b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN wget http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v0.11.5 chmod 755 /opt/FastQC/fastqc && \ rm -rf /tmp/fastqc_* -RUN mamba install -c conda-forge bash_kernel +RUN mamba install -c conda-forge bash_kernel nb_conda_kernels # create scanpy_2021 conda environment with required python packages COPY scanpy_2021.yaml /tmp