Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docker/AlmaLinux/Dockerfile.almalinux8.5-spark-py-openeo
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ RUN dnf clean all && dnf install -y epel-release && \
Rlib-proxy \
libtiff-tools \
blosc \
compat-libgfortran-48-4.8.5-36.1.el8.x86_64 && \
compat-libgfortran-48-4.8.5-36.1.el8.x86_64 \
gcc-c++ && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we try to keep our docker image size small, how much size does adding the c++ compiler require?
The normal solution for this is to build a wheel with the desired binaries included, this wheel can then be put on artifactory so that we can use it when building docker images.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new docker image (so including c++ compiler and numpy) went from 2.08GB to 2.29GB.

ln -s /usr/lib64/libgdal.so.34 /usr/lib64/libgdal.so.27 && \
python3.8 -m pip install --upgrade --target /usr/lib64/python3.8/site-packages/ pip setuptools wheel && \
python3.8 -m pip install --upgrade --target /usr/lib64/python3.8/site-packages/ 'rpy2==3.5.12' && \
python3.8 -m pip install --upgrade --target /usr/lib64/python3.8/site-packages/ pip setuptools wheel rpy2==3.5.12 numpy==1.22.4 && \
python3.8 -m pip install --upgrade --target /usr/lib64/python3.8/site-packages/ --no-cache --force-reinstall GDAL[numpy]=="$(gdal-config --version).*" && \
chmod +x /usr/bin/tini && \
rm -r /root/.cache && \
yum clean all && \
Expand Down