From d6895c5ba18c1d14d8f97d7da02ba7a55ee1bcf4 Mon Sep 17 00:00:00 2001 From: yohanchatelain Date: Wed, 8 May 2024 15:33:39 -0400 Subject: [PATCH] Merge Dockerfile ubuntu:24.0 into Dockerfile --- .github/workflows/docker-ci.yml | 1 - Dockerfile | 12 +++---- Dockerfile_ubuntu-24.04 | 62 --------------------------------- 3 files changed, 6 insertions(+), 69 deletions(-) delete mode 100644 Dockerfile_ubuntu-24.04 diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 9d7f4d9a..99195f0d 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -84,7 +84,6 @@ jobs: - os: ubuntu:24.04 llvm: 16 gcc: 9 - file: Dockerfile_ubuntu-24.04 runs-on: ubuntu-22.04 env: TEST_TAG: verificarlo/verificarlo:test-llvm-${{ matrix.llvm }} diff --git a/Dockerfile b/Dockerfile index 4690bc3a..e194efe2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,16 +19,16 @@ ENV PYTHONPATH /usr/local/lib/python${PYTHON_VERSION}/site-packages/:${PYTHONPAT # Retrieve dependencies RUN apt-get -y update && apt-get -y --no-install-recommends install tzdata -RUN export UBUNTU_VERSION=$(grep 'VERSION_ID' /etc/os-release | cut -d'=' -f2) ; \ - if [ "$UBUNTU_VERSION" = "ubuntu:24.04" ]; then \ - apt-get -y install --no-install-recommends libclang-rt-${LLVM_VERSION}-dev ; \ - fi - -RUN apt-get -y install --no-install-recommends \ +RUN export UBUNTU_VERSION=$(grep 'VERSION_ID' /etc/os-release | cut -d'=' -f2 | tr -d '"' ) && \ + if [ "$UBUNTU_VERSION" = "24.04" ]; then \ + export LIBCLANG_RT="libclang-rt-${LLVM_VERSION}-dev" ; \ + fi && \ + apt-get -y install --no-install-recommends \ bash ca-certificates make git libmpfr-dev \ autogen dh-autoreconf autoconf automake autotools-dev libedit-dev libtool libz-dev binutils \ clang-${LLVM_VERSION} llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev \ libomp5-${LLVM_VERSION} libomp-${LLVM_VERSION}-dev \ + ${LIBCLANG_RT} \ gcc-${GCC_VERSION} g++-${GCC_VERSION} \ gfortran-${GCC_VERSION} libgfortran-${GCC_VERSION}-dev ${WITH_FLANG} \ python3 python3-pip python3-dev cython3 parallel && \ diff --git a/Dockerfile_ubuntu-24.04 b/Dockerfile_ubuntu-24.04 deleted file mode 100644 index 528d6302..00000000 --- a/Dockerfile_ubuntu-24.04 +++ /dev/null @@ -1,62 +0,0 @@ -# -# Dockerfile for Verificarlo (github.com/verificarlo/verificarlo) -# This image includes support for Fortran and uses llvm-7 and gcc-7 -# - -ARG UBUNTU_VERSION=ubuntu:24.04 -FROM ${UBUNTU_VERSION} -LABEL maintainer="verificarlo contributors " - -ARG PYTHON_VERSION=3.12 -ARG LLVM_VERSION=14 -ARG GCC_VERSION=9 -ARG WITH_FLANG=flang -ARG GCC_PATH=/usr/lib/gcc/x86_64-linux-gnu/${GCC_VERSION} -ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH -ENV PATH /usr/local/bin:$PATH -ENV PYTHONPATH /usr/local/lib/python${PYTHON_VERSION}/site-packages/:${PYTHONPATH} - -# Retrieve dependencies -RUN apt-get -y update && apt-get -y --no-install-recommends install tzdata -RUN apt-get -y install --no-install-recommends \ - bash ca-certificates make git libmpfr-dev \ - autogen dh-autoreconf autoconf automake autotools-dev libedit-dev libtool libz-dev binutils \ - libstdc++-14-dev libomp-${LLVM_VERSION}-dev libclang-rt-${LLVM_VERSION}-dev \ - clang-${LLVM_VERSION} llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev \ - gcc-${GCC_VERSION} g++-${GCC_VERSION} \ - gfortran-${GCC_VERSION} libgfortran-${GCC_VERSION}-dev ${WITH_FLANG} \ - python3 python3-pip python3-dev cython3 parallel && \ - rm -rf /var/lib/apt/lists/* - -WORKDIR /build/ - -ENV LIBRARY_PATH ${GCC_PATH}:$LIBRARY_PATH - -# Install other Python dependencies (not available with apt-get) via pip -RUN ln -s /usr/bin/x86_64-linux-gnu-gcc-${GCC_VERSION} /usr/bin/x86_64-linux-gnu-gcc - -# Download and configure verificarlo from git master -ENV AR=gcc-ar-${GCC_VERSION} -ENV RANLIB=gcc-ranlib-${GCC_VERSION} -ENV CC=gcc-${GCC_VERSION} -ENV CXX=g++-${GCC_VERSION} -COPY . /build/verificarlo/ -WORKDIR /build/verificarlo - - -RUN if [ "$WITH_FLANG" = "flang" ]; then \ - export FLANG_OPTION="--with-flang"; \ - else \ - export FLANG_OPTION="--without-flang"; \ - fi && \ - ./autogen.sh && \ - ./configure \ - --with-llvm=$(llvm-config-${LLVM_VERSION} --prefix) \ - $FLANG_OPTION || { cat config.log; exit 1; } - -# Build verificarlo -RUN make && make install - -# Setup working directory -VOLUME /workdir -WORKDIR /workdir