From 2709e7733d1e261db4ca864f0529bb18d374dec6 Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Fri, 16 Sep 2022 22:34:24 +1000 Subject: [PATCH 1/6] Add libatlas3-base --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0472bdd..77df5f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ cmake \ - libgeos-dev && \ + libgeos-dev \ + libatlas3-base && \ rm -rf /var/lib/apt/lists/* # Copy in requirements.txt. @@ -46,6 +47,7 @@ RUN case $(uname -m) in \ apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ + libatlas3-base \ libeccodes0 \ libgeos-c1v5 \ libglib2.0-0 \ From 75c75aee9018271efe1b57612932e7859e78306d Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Thu, 22 Sep 2022 21:48:02 +1000 Subject: [PATCH 2/6] libatlas3-base-dev --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 77df5f8..cba8541 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y \ cmake \ libgeos-dev \ - libatlas3-base && \ + libatlas3-base-dev && \ rm -rf /var/lib/apt/lists/* # Copy in requirements.txt. From 110b297bf4217428137775886b785ca6c23e84fe Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Thu, 22 Sep 2022 21:49:13 +1000 Subject: [PATCH 3/6] Tweak pip args --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cba8541..14a6628 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ COPY requirements.txt /root/chasemapper/requirements.txt # Install Python packages. RUN pip3 --no-cache-dir install --user --no-warn-script-location \ - --extra-index-url https://www.piwheels.org/simple \ + --ignore-installed --no-binary numpy \ -r /root/chasemapper/requirements.txt # Copy in chasemapper. From 8ec7127a764172f18ea7231dc0edc7f1c415cd8d Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Thu, 22 Sep 2022 21:54:25 +1000 Subject: [PATCH 4/6] Update package name --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14a6628..a792d8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y \ cmake \ libgeos-dev \ - libatlas3-base-dev && \ + libatlas-base-dev && \ rm -rf /var/lib/apt/lists/* # Copy in requirements.txt. @@ -47,7 +47,6 @@ RUN case $(uname -m) in \ apt-get update && \ apt-get upgrade -y && \ apt-get install -y \ - libatlas3-base \ libeccodes0 \ libgeos-c1v5 \ libglib2.0-0 \ From 8eec272d7facb44b3c5ae8723fd4dd87e91fa4c9 Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Fri, 23 Sep 2022 10:05:38 +1000 Subject: [PATCH 5/6] Use registry cache --- .github/workflows/container.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index bbf7f53..c818f9a 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -28,14 +28,6 @@ jobs: - name: Setup Buildx uses: docker/setup-buildx-action@v1 - - name: Cache Layers - uses: actions/cache@v2 - with: - path: /tmp/buildx-cache - key: buildx-cache-${{ github.sha }} - restore-keys: | - buildx-cache- - - name: Login to GitHub Container Registry uses: docker/login-action@v1 if: github.event_name != 'pull_request' @@ -45,17 +37,12 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and Push Images - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v6, linux/arm/v7 - cache-from: type=local,src=/tmp/buildx-cache - cache-to: type=local,dest=/tmp/buildx-cache-new,mode=max + cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache + cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - - name: Move Cache - run: | - rm -rf /tmp/buildx-cache - mv /tmp/buildx-cache-new /tmp/buildx-cache From d0df0e7ad82a53f4c125878e40787b679d22b8fd Mon Sep 17 00:00:00 2001 From: Steven Honson Date: Fri, 23 Sep 2022 21:05:27 +1000 Subject: [PATCH 6/6] Always login Required for registry based cache --- .github/workflows/container.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index c818f9a..5930535 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -30,7 +30,6 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v1 - if: github.event_name != 'pull_request' with: registry: ghcr.io username: ${{ github.repository_owner }}