From 53367cb898d6dab2d48da183313560ff21262074 Mon Sep 17 00:00:00 2001 From: aschmere Date: Tue, 18 Jun 2024 15:21:57 +0200 Subject: [PATCH] Release v1.5.0 - Switch to version 16.0.1 of the Home Assistant Addon base image. - Update netCDF4 to version 1.7.1. --- dwd_global_rad_api_server/Dockerfile | 36 ++++++++++++++++------ dwd_global_rad_api_server/config.yaml | 2 +- dwd_global_rad_api_server/requirements.txt | 4 +-- dwd_global_rad_api_server_dev/Dockerfile | 1 + dwd_global_rad_api_server_dev/config.yaml | 2 +- 5 files changed, 31 insertions(+), 14 deletions(-) diff --git a/dwd_global_rad_api_server/Dockerfile b/dwd_global_rad_api_server/Dockerfile index 8b8353d..429b782 100644 --- a/dwd_global_rad_api_server/Dockerfile +++ b/dwd_global_rad_api_server/Dockerfile @@ -1,4 +1,4 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base:16.0.0 +ARG BUILD_FROM=ghcr.io/hassio-addons/base:16.0.1 # hadolint ignore=DL3006 FROM ${BUILD_FROM} @@ -8,11 +8,20 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Add env ENV TERM="xterm-256color" -# Install build tools, HDF5, netCDF, PROJ libraries, Python, and pip -RUN apk update && apk add --no-cache \ - build-base \ - cmake \ - ninja \ +# Install build dependencies +RUN apk update && apk add --no-cache --virtual .build-dependencies \ + build-base=0.5-r3 \ + cmake=3.29.3-r0 \ + json-c-dev=0.17-r0 \ + libffi-dev=3.4.6-r0 \ + libuv-dev=1.48.0-r0 \ + openssl-dev=3.3.1-r0 \ + python3-dev=3.12.3-r1 \ + zlib-dev=1.3.1-r1 \ + && rm -rf /var/cache/apk/* + +# Install runtime dependencies +RUN apk add --no-cache \ hdf5 \ hdf5-dev \ netcdf \ @@ -22,9 +31,8 @@ RUN apk update && apk add --no-cache \ proj-dev \ gdal \ gdal-dev \ - python3 \ - python3-dev \ - py3-pip \ + python3=3.12.3-r1 \ + py3-pip=24.0-r2 \ geos \ geos-dev \ && rm -rf /var/cache/apk/* @@ -43,7 +51,13 @@ COPY requirements.txt . # Create and activate a virtual environment, then install Python dependencies RUN python3 -m venv /app/venv \ && . /app/venv/bin/activate \ - && pip install --no-cache-dir -r requirements.txt + && pip install --upgrade pip \ + && pip install --no-cache-dir -r requirements.txt \ + && . /app/venv/bin/activate \ + && pip list + +# Remove build dependencies after Python packages are installed +RUN apk del .build-dependencies # Copy the rest of your application files COPY . . @@ -60,3 +74,5 @@ RUN chmod +x /etc/services.d/dwd_global_rad_api_server/run # Run the application using S6 init system #ENTRYPOINT ["/init"] + + diff --git a/dwd_global_rad_api_server/config.yaml b/dwd_global_rad_api_server/config.yaml index c02f354..9f8196f 100644 --- a/dwd_global_rad_api_server/config.yaml +++ b/dwd_global_rad_api_server/config.yaml @@ -1,6 +1,6 @@ # https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config name: DWD Global Rad Api Server -version: "1.4.9" +version: "1.5.0" slug: dwd_global_rad_api_server description: DWD Global Rad Api Server arch: diff --git a/dwd_global_rad_api_server/requirements.txt b/dwd_global_rad_api_server/requirements.txt index de6832e..0c302db 100644 --- a/dwd_global_rad_api_server/requirements.txt +++ b/dwd_global_rad_api_server/requirements.txt @@ -1,8 +1,8 @@ matplotlib cartopy -numpy==1.26.4 +numpy<2 xarray -netCDF4==1.6.5 +netCDF4 flask requests dwd_global_radiation diff --git a/dwd_global_rad_api_server_dev/Dockerfile b/dwd_global_rad_api_server_dev/Dockerfile index d8126fc..e974a60 100644 --- a/dwd_global_rad_api_server_dev/Dockerfile +++ b/dwd_global_rad_api_server_dev/Dockerfile @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y \ git \ ffmpeg \ procps \ + libhdf5-dev \ && rm -rf /var/lib/apt/lists/* RUN pip install --upgrade pip setuptools wheel diff --git a/dwd_global_rad_api_server_dev/config.yaml b/dwd_global_rad_api_server_dev/config.yaml index 358479b..88ca1aa 100644 --- a/dwd_global_rad_api_server_dev/config.yaml +++ b/dwd_global_rad_api_server_dev/config.yaml @@ -1,7 +1,7 @@ # https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config name: DWD Global Rad Api Server (Development) version: "0.1.0" -slug: dwd_global_rad_api_server +slug: dwd_global_rad_api_server_dev description: DWD Global Rad Api Server arch: - armv7