1- # Based on old ubuntu to create more compatible binaries
1+ # Based on manylinux_2_28 (AlmaLinux 8, GLIBC 2.28) for maximum HPC compatibility
2+ # Binaries built here will run on RHEL/Rocky/Alma 8+, Ubuntu 20.04+, and most HPC clusters
23
34# To build (e.g. for ShapeWorks 6.7):
4- # docker build --progress=plain -t akenmorris/ubuntu -build-box-jammy -sw67 .
5+ # docker build --progress=plain -t akenmorris/manylinux -build-box-sw67 .
56# To publish:
6- # docker push akenmorris/ubuntu -build-box-jammy -sw67
7+ # docker push akenmorris/manylinux -build-box-sw67
78
8- FROM ubuntu:jammy-20250819 AS env
9- MAINTAINER akenmorris@gmail.com
9+ FROM quay.io/pypa/manylinux_2_28_x86_64 AS env
10+ LABEL maintainer= " akenmorris@gmail.com"
1011
1112# Set environment variables
12- ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
13+ ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin:/opt/ conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
1314
14- ARG DEBIAN_FRONTEND=noninteractive
15- ENV TZ=Etc/UTC
15+ # Enable PowerTools repo for additional development packages
16+ RUN dnf install -y dnf-plugins-core && dnf config-manager --set-enabled powertools
1617
17- # Update
18- RUN apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install build-essential software-properties-common -y && add-apt-repository ppa:ubuntu-toolchain-r/test -y && apt-get update -y
18+ # Update and install build tools
19+ # gcc-toolset-13 provides GCC 13 with GLIBCXX_3.4.31, required by conda Qt5/ICU packages.
20+ # This keeps GLIBC 2.28 for binary compatibility while providing modern C++ library symbols.
21+ RUN dnf update -y && dnf groupinstall -y "Development Tools" \
22+ && dnf install -y gcc-toolset-13-gcc gcc-toolset-13-gcc-c++ gcc-toolset-13-binutils gcc-toolset-13-libstdc++-devel
1923
2024# Install git and git-lfs
21- RUN add-apt-repository ppa:git-core/ppa
22- RUN apt-get update
23- RUN apt-get install git curl -y
24- RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
25- RUN apt-get install git-lfs -y
25+ RUN dnf install -y git curl
26+ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
27+ RUN dnf install -y git-lfs
2628
2729# Install other dependencies
28- RUN apt-get install rsync freeglut3-dev libgl1- mesa-dev libegl1- mesa zip libcups2 pigz wget ccache -y
30+ RUN dnf install -y rsync freeglut-devel mesa-libGL-devel mesa-libEGL-devel zip cups-libs pigz wget ccache
2931
3032# Install conda
3133RUN curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/Miniconda3-latest-Linux-x86_64.sh \
@@ -38,6 +40,15 @@ RUN curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -
3840 && echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc \
3941 && echo "conda activate base" >> ~/.bashrc
4042
43+ # Install modern libstdc++ with GLIBCXX_3.4.30+ required by conda Qt5/ICU packages
44+ # gcc-toolset-13 only provides static libstdc++, so we use conda-forge's libstdcxx-ng
45+ RUN /opt/conda/bin/conda install -y -c conda-forge libstdcxx-ng=13 \
46+ && LIBSTDCXX=$(ls /opt/conda/lib/libstdc++.so.6.0.* | head -1) \
47+ && cp -f "$LIBSTDCXX" /usr/lib64/ \
48+ && rm -f /usr/lib64/libstdc++.so.6 \
49+ && ln -s $(basename "$LIBSTDCXX" ) /usr/lib64/libstdc++.so.6 \
50+ && ldconfig
51+
4152# Get and decompress linuxdeployqt, it's complicated to use fuse with docker due to the kernel module
4253RUN curl -L -o $HOME/linuxdeployqt.AppImage https://github.com/probonopd/linuxdeployqt/releases/download/5/linuxdeployqt-5-x86_64.AppImage && chmod +x $HOME/linuxdeployqt.AppImage ; cd $HOME ; ./linuxdeployqt.AppImage --appimage-extract
4354RUN ln -s /root/squashfs-root/usr/bin/linuxdeployqt /usr/bin
0 commit comments