Skip to content

Commit

Permalink
Docker: Add platform linux/arm/v7
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Jan 18, 2025
1 parent e5e06c6 commit 408740f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Development

### Feature
- Docker: Add platform `linux/arm/v7`

## 0.102.0 - 2025-01-17

### Feature
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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

Expand Down

0 comments on commit 408740f

Please sign in to comment.