hdf5.h not found after installing hdf5-dev
I am trying to build a standard set of images atop the standard Python images for difficult-to-install Python libraries. https://github.com/dHannasch/alpine-pandas/blob/3.7-hickle-alpine/Dockerfile
Installation of h5py is failing due to not finding hdf5.h.
hdf5-dev is successfully installed with apk add --no-cache --virtual hdf5-dev --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/
(which also worked in the past for e.g. https://hub.docker.com/r/zerospam/docker-python3-builder/dockerfile):
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/1) Installing hdf5-dev (20191107.184404)
OK: 502 MiB in 79 packages
But compilation fails, complaining that it cannot find hdf5.py.
According to gcc -print-prog-name=cc1plus
, it is looking for header files in /usr/include, among other places.
According to https://pkgs.alpinelinux.org/contents?repo=testing&page=2&arch=x86&branch=edge&name=hdf5-dev, /usr/include/hdf5.h should exist. But it does not.
ls: /usr/include/hdf5.h: No such file or directory
(find / -name hdf5*.h*
also turns up nothing, for the record. Also, apk info -a hdf5-dev
does not show any files, for whatever reason.)
This is the Dockerfile I am trying to run:
RUN apk add --no-cache --virtual build-base \
&& apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing py3-h5py \
&& apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing hdf5 \
&& apk add --no-cache --virtual hdf5-dev --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ \
# apk add --no-cache --virtual --repository http://dl-3.alpinelinux.org/alpine/edge/testing hdf5-dev results in ERROR: unsatisfiable constraints
&& apk info -a hdf5-dev \
&& echo "LD_LIBRARY_PATH is $LD_LIBRARY_PATH" \
# https://pkgs.alpinelinux.org/contents?file=&path=&name=hdf5&branch=edge&repo=testing&arch=x86
&& ln -s /usr/lib/libhdf5.so.103 /usr/lib/libhdf5.so \
&& `gcc -print-prog-name=cc1plus` -v \
# https://pkgs.alpinelinux.org/contents?repo=testing&page=2&arch=x86&branch=edge&name=hdf5-dev
&& echo "find / -name hdf5.h:" \
&& find / -name hdf5*.h* \
&& ls /usr/include/hdf5.h \
&& pip install --no-cache-dir --no-binary :all: hickle \
&& python -c "import hickle"