diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile index a8bb2227ab..5ed81b94db 100644 --- a/.github/workflows/Dockerfile +++ b/.github/workflows/Dockerfile @@ -1,31 +1,36 @@ -# Based on old ubuntu to create more compatible binaries +# Based on manylinux_2_28 (AlmaLinux 8, GLIBC 2.28) for maximum HPC compatibility +# Binaries built here will run on RHEL/Rocky/Alma 8+, Ubuntu 20.04+, and most HPC clusters # To build (e.g. for ShapeWorks 6.7): -# docker build --progress=plain -t akenmorris/ubuntu-build-box-jammy-sw67 . +# docker build --progress=plain -t akenmorris/manylinux-build-box-sw67 . # To publish: -# docker push akenmorris/ubuntu-build-box-jammy-sw67 +# docker push akenmorris/manylinux-build-box-sw67 -FROM ubuntu:jammy-20250819 AS env +FROM quay.io/pypa/manylinux_2_28_x86_64 AS env MAINTAINER akenmorris@gmail.com # Set environment variables -ENV PATH=/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV PATH=/opt/rh/gcc-toolset-12/root/usr/bin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=Etc/UTC +# Enable PowerTools repo for additional development packages +RUN dnf install -y dnf-plugins-core && dnf config-manager --set-enabled powertools -# Update -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 +# Update and install build tools +# gcc-toolset-12 provides modern GCC 12 while keeping GLIBC 2.28 for binary compatibility. +# The conda Qt5/ICU packages require GLIBCXX_3.4.28+ which system GCC 8 doesn't provide. +RUN dnf update -y && dnf groupinstall -y "Development Tools" \ + && dnf install -y gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils + +# Ensure gcc-toolset-12's libstdc++ is available at link time +ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-12/root/usr/lib64:/opt/rh/gcc-toolset-12/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} # Install git and git-lfs -RUN add-apt-repository ppa:git-core/ppa -RUN apt-get update -RUN apt-get install git curl -y -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash -RUN apt-get install git-lfs -y +RUN dnf install -y git curl +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash +RUN dnf install -y git-lfs # Install other dependencies -RUN apt-get install rsync freeglut3-dev libgl1-mesa-dev libegl1-mesa zip libcups2 pigz wget ccache -y +RUN dnf install -y rsync freeglut-devel mesa-libGL-devel mesa-libEGL-devel zip cups-libs pigz wget ccache # Install conda RUN curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/Miniconda3-latest-Linux-x86_64.sh \ diff --git a/.github/workflows/build-linux-debug.yml b/.github/workflows/build-linux-debug.yml index 84a107ae73..5cdc52f247 100644 --- a/.github/workflows/build-linux-debug.yml +++ b/.github/workflows/build-linux-debug.yml @@ -24,7 +24,7 @@ jobs: build: runs-on: ubuntu-latest - container: akenmorris/ubuntu-build-box-jammy-sw67 + container: akenmorris/manylinux-build-box-sw67 steps: @@ -66,7 +66,7 @@ jobs: uses: actions/cache/restore@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: Check space3.5 run: df -h @@ -107,7 +107,7 @@ jobs: uses: actions/cache/save@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-debug-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: Check space5 run: df -h diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index a0c2fa6efd..994ee9482b 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -25,7 +25,7 @@ jobs: build: runs-on: ubuntu-latest - container: akenmorris/ubuntu-build-box-jammy-sw67 + container: akenmorris/manylinux-build-box-sw67 steps: @@ -64,7 +64,7 @@ jobs: uses: actions/cache/restore@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: try import vtk shell: bash -l {0} @@ -81,7 +81,7 @@ jobs: uses: actions/cache/save@v3 with: path: /github/home/install - key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} + key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/Dockerfile', '.github/workflows/gha_deps.sh', 'install_shapeworks.sh', 'python_requirements.txt', 'build_dependencies.sh') }} - name: Check space4 run: df -h