From af473defea83ae524a80cdfa476e025cacb3fb0b Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Thu, 15 Aug 2024 16:49:38 +0200 Subject: [PATCH 01/10] add ubuntu 24 --- .github/workflows/docker-publish.yml | 12 ++++++++++++ Dockerfile | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 7c1c850..f9bd099 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -17,6 +17,18 @@ jobs: llvm: 11 - ubuntu: 22 llvm: 12 + - ubuntu: 24 + llvm: 11 + - ubuntu: 24 + llvm: 12 + - ubuntu: 24 + llvm: 13 + - ubuntu: 24 + llvm: 14 + - ubuntu: 24 + llvm: 15 + - ubuntu: 24 + llvm: 16 permissions: packages: write contents: read diff --git a/Dockerfile b/Dockerfile index 0387e8e..b660eef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,11 @@ RUN apt-get -q update \ && apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ && apt-get -q update \ && apt-get install -y --no-install-recommends sudo git ssh zlib1g-dev libzstd-dev automake autoconf cmake make lldb ninja-build gcc g++ gfortran build-essential libtool llvm-$LLVM_VERSION-dev clang-format clangd clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev libomp-$LLVM_VERSION-dev libblas-dev libeigen3-dev libboost-dev python3 python3-pip \ - && python3 -m pip install --upgrade pip lit pathlib2 \ + if [ "$UBUNTU_VERSION" == "22.04" ] ; then \ + python3 -m pip install --break-system-packages lit pathlib2 \ + else \ + python3 -m pip install lit pathlib2 \ + fi \ && groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ From 40f8c67177a9e2bcfb024827972fc26fb4a1cfbb Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Thu, 15 Aug 2024 16:57:57 +0200 Subject: [PATCH 02/10] fix ub version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b660eef..37196e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get -q update \ && apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ && apt-get -q update \ && apt-get install -y --no-install-recommends sudo git ssh zlib1g-dev libzstd-dev automake autoconf cmake make lldb ninja-build gcc g++ gfortran build-essential libtool llvm-$LLVM_VERSION-dev clang-format clangd clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev libomp-$LLVM_VERSION-dev libblas-dev libeigen3-dev libboost-dev python3 python3-pip \ - if [ "$UBUNTU_VERSION" == "22.04" ] ; then \ + if [ "$UBUNTU_VERSION" == "24.04" ] ; then \ python3 -m pip install --break-system-packages lit pathlib2 \ else \ python3 -m pip install lit pathlib2 \ From 8c10ff90aa85a8004df27a4c2514d1815b761924 Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Thu, 15 Aug 2024 17:00:21 +0200 Subject: [PATCH 03/10] meh --- Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37196e5..b39485c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,11 +17,7 @@ RUN apt-get -q update \ && apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ && apt-get -q update \ && apt-get install -y --no-install-recommends sudo git ssh zlib1g-dev libzstd-dev automake autoconf cmake make lldb ninja-build gcc g++ gfortran build-essential libtool llvm-$LLVM_VERSION-dev clang-format clangd clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev libomp-$LLVM_VERSION-dev libblas-dev libeigen3-dev libboost-dev python3 python3-pip \ - if [ "$UBUNTU_VERSION" == "24.04" ] ; then \ - python3 -m pip install --break-system-packages lit pathlib2 \ - else \ - python3 -m pip install lit pathlib2 \ - fi \ + if [[ "$UBUNTU_VERSION" == "24.04" ]] ; then python3 -m pip install --break-system-packages lit pathlib2 ; python3 -m pip install lit pathlib2 ; fi \ && groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ From f0219e743c207f9f48d157454831e755f8299eb9 Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Thu, 15 Aug 2024 17:07:59 +0200 Subject: [PATCH 04/10] fix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b39485c..5657c98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get -q update \ && apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ && apt-get -q update \ && apt-get install -y --no-install-recommends sudo git ssh zlib1g-dev libzstd-dev automake autoconf cmake make lldb ninja-build gcc g++ gfortran build-essential libtool llvm-$LLVM_VERSION-dev clang-format clangd clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev libomp-$LLVM_VERSION-dev libblas-dev libeigen3-dev libboost-dev python3 python3-pip \ - if [[ "$UBUNTU_VERSION" == "24.04" ]] ; then python3 -m pip install --break-system-packages lit pathlib2 ; python3 -m pip install lit pathlib2 ; fi \ + if [ "$UBUNTU_VERSION" == "24.04" ] then python3 -m pip install --break-system-packages lit pathlib2 else python3 -m pip install lit pathlib2 fi \ && groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ From 12e2e809309bdfa891e5f2cea53f536235c1a3c7 Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Thu, 15 Aug 2024 17:17:04 +0200 Subject: [PATCH 05/10] fix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5657c98..2301973 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get -q update \ && apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ && apt-get -q update \ && apt-get install -y --no-install-recommends sudo git ssh zlib1g-dev libzstd-dev automake autoconf cmake make lldb ninja-build gcc g++ gfortran build-essential libtool llvm-$LLVM_VERSION-dev clang-format clangd clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev libomp-$LLVM_VERSION-dev libblas-dev libeigen3-dev libboost-dev python3 python3-pip \ - if [ "$UBUNTU_VERSION" == "24.04" ] then python3 -m pip install --break-system-packages lit pathlib2 else python3 -m pip install lit pathlib2 fi \ + if [[ $UBUNTU_VERSION == "24.04" ]] then python3 -m pip install --break-system-packages lit pathlib2 else python3 -m pip install lit pathlib2 fi \ && groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ From 7d584f91bb2dd67d80bb62fa0b0ae51ca5469a0b Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Thu, 15 Aug 2024 17:28:13 +0200 Subject: [PATCH 06/10] fix --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2301973..08d5182 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,6 @@ RUN apt-get -q update \ && apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ && apt-get -q update \ && apt-get install -y --no-install-recommends sudo git ssh zlib1g-dev libzstd-dev automake autoconf cmake make lldb ninja-build gcc g++ gfortran build-essential libtool llvm-$LLVM_VERSION-dev clang-format clangd clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev libomp-$LLVM_VERSION-dev libblas-dev libeigen3-dev libboost-dev python3 python3-pip \ - if [[ $UBUNTU_VERSION == "24.04" ]] then python3 -m pip install --break-system-packages lit pathlib2 else python3 -m pip install lit pathlib2 fi \ && groupadd --gid $USER_GID $USERNAME \ && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ @@ -26,6 +25,12 @@ RUN apt-get -q update \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* +RUN if [ "$UBUNTU_VERSION" = "24.04" ] ; then \ + python3 -m pip install --break-system-packages lit pathlib2; \ + else \ + python3 -m pip install lit pathlib2; \ + fi + RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \ && mkdir /commandhistory \ && touch /commandhistory/.bash_history \ From 55fe56f514d4aa5a2ae629de6895d4f00bb218f0 Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Thu, 15 Aug 2024 23:48:27 +0200 Subject: [PATCH 07/10] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index f9bd099..5b23f5d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,6 +1,8 @@ name: Publish Docker images on: push: + branches: + - main pull_request: jobs: From 98070f1f0c7c6402fb71f5968097832123dda317 Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Wed, 21 Aug 2024 23:15:06 +0200 Subject: [PATCH 08/10] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 08d5182..ac082e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get -q update \ && apt-get install -y --no-install-recommends ca-certificates software-properties-common curl gnupg2 \ && curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - \ - && apt-add-repository "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ + && apt-add-repository -y "deb http://apt.llvm.org/`lsb_release -cs`/ llvm-toolchain-`lsb_release -cs`-$LLVM_VERSION main" \ && apt-get -q update \ && apt-get install -y --no-install-recommends sudo git ssh zlib1g-dev libzstd-dev automake autoconf cmake make lldb ninja-build gcc g++ gfortran build-essential libtool llvm-$LLVM_VERSION-dev clang-format clangd clang-$LLVM_VERSION libclang-$LLVM_VERSION-dev libomp-$LLVM_VERSION-dev libblas-dev libeigen3-dev libboost-dev python3 python3-pip \ && groupadd --gid $USER_GID $USERNAME \ From 5a66c9a3315fabbcebd9ee8a0bf7a2d7e894e88c Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Wed, 21 Aug 2024 23:33:23 +0200 Subject: [PATCH 09/10] fix gid in use issue --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ac082e3..6275a08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:$UBUNTU_VERSION ARG LLVM_VERSION ARG USERNAME=vscode -ARG USER_UID=1000 +ARG USER_UID=1001 ARG USER_GID=$USER_UID ENV DEBIAN_FRONTEND=noninteractive From 63f11a33306414debf31862f524e4d0059abc45a Mon Sep 17 00:00:00 2001 From: Tim Gymnich Date: Wed, 21 Aug 2024 23:33:36 +0200 Subject: [PATCH 10/10] make UBUNTU_VERSION available --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6275a08..750cfd7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ ARG LLVM_VERSION=12 FROM ubuntu:$UBUNTU_VERSION ARG LLVM_VERSION +ARG UBUNTU_VERSION ARG USERNAME=vscode ARG USER_UID=1001