From 408740f14b0b132deada971a438242015fc2322b Mon Sep 17 00:00:00 2001 From: Benjamin Gutzmann Date: Fri, 17 Jan 2025 23:56:27 +0100 Subject: [PATCH] Docker: Add platform `linux/arm/v7` --- .github/workflows/docker-publish.yml | 2 +- CHANGELOG.md | 3 +++ Dockerfile | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index bc534a949..f714daa4f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -130,7 +130,7 @@ jobs: with: context: . file: Dockerfile - platforms: linux/amd64,linux/arm64 # TODO: add linux/arm/v7 + platforms: linux/amd64,linux/arm64,linux/arm/v7 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} push: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cc6268f2..b94c5ba1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Development +### Feature +- Docker: Add platform `linux/arm/v7` + ## 0.102.0 - 2025-01-17 ### Feature diff --git a/Dockerfile b/Dockerfile index dd9249489..bcff96dfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,13 @@ ENV TERM=linux # Install build prerequisites. RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache + +# the following two lines are temporarily required +# we need proj-bin>=9.2 which is not available in bookworm, so we take it from sid +RUN echo "deb http://deb.debian.org/debian sid main" >> /etc/apt/sources.list +# reduce sid priorty to avoid installing other packages from sid, install proj-bin from sid everything else from bookworm +RUN echo "Package: *\nPin: release a=bookworm\nPin-Priority: 900\n\nPackage: proj-bin\nPin: release a=sid\nPin-Priority: 800" > /etc/apt/preferences.d/proj-bin + RUN \ --mount=type=cache,id=apt,sharing=locked,target=/var/cache/apt \ --mount=type=cache,id=apt,sharing=locked,target=/var/lib/apt \ @@ -14,8 +21,13 @@ RUN \ git build-essential python3-dev python3-pip python3-venv python3-wheel \ python3-h5py ca-certificates pkg-config libhdf5-dev +# install proj-bin in linux/arm/v7 +RUN if [ "$(uname -m)" = "armv7l" ]; then apt-get install --no-install-recommends --no-install-suggests --yes proj-bin; fi + RUN pip install uv +# install pyproj (required by wradlib) in linux/arm/v7 +RUN if [ "$(uname -m)" = "armv7l" ]; then uv pip install --system pyproj; fi # Install wradlib. RUN uv pip install --system wradlib