From 71b04a4786cc04172a02778903c33403c5a4b46e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 6 Aug 2024 13:51:13 +0200 Subject: [PATCH 1/9] Build Ubuntu 24.04 image in CI --- .github/workflows/containers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index ffcf290..2e60fd8 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -36,6 +36,7 @@ jobs: dockerfile: [[e4s-ubuntu-18.04, e4s-ubuntu-18.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], [e4s-ubuntu-20.04, e4s-ubuntu-20.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], [ubuntu-22.04, ubuntu-22.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], + [ubuntu-24.04, ubuntu-24.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], [linux-ubuntu22.04-x86_64_v2, linux-ubuntu22.04-x86_64_v2/Dockerfile, 'linux/amd64'], [tutorial-ubuntu-22.04, tutorial-ubuntu-22.04/Dockerfile, 'linux/amd64'], [e4s-amazonlinux-2, e4s-amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'], From 566f8a47b212a658264b6d9617a660ab50b9fe04 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 6 Aug 2024 14:22:53 +0200 Subject: [PATCH 2/9] Install Python libs to user directory --- Dockerfiles/ubuntu-24.04.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index 39330c8..a6a6445 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -44,8 +44,8 @@ RUN apt update -y \ && ln -s /usr/bin/gpg /usr/bin/gpg2 \ && ln -s `which python3` /usr/bin/python -RUN python -m pip install --upgrade pip setuptools wheel \ - && python -m pip install gnureadline boto3 pyyaml pytz minio requests clingo \ +RUN python -m pip install --user --upgrade pip setuptools wheel \ + && python -m pip install --user gnureadline boto3 pyyaml pytz minio requests clingo \ && rm -rf ~/.cache CMD ["/bin/bash"] From a31414b13d24900393c5678726403fcdb10d50d0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 6 Aug 2024 14:57:19 +0200 Subject: [PATCH 3/9] Don't upgrade --- Dockerfiles/ubuntu-24.04.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index a6a6445..fc59f22 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -44,7 +44,7 @@ RUN apt update -y \ && ln -s /usr/bin/gpg /usr/bin/gpg2 \ && ln -s `which python3` /usr/bin/python -RUN python -m pip install --user --upgrade pip setuptools wheel \ +RUN python -m pip install --user pip setuptools wheel \ && python -m pip install --user gnureadline boto3 pyyaml pytz minio requests clingo \ && rm -rf ~/.cache From 8b3be257a581effe921bf547d23494cea7266603 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 6 Aug 2024 16:13:49 +0200 Subject: [PATCH 4/9] Install Python libs using apt --- Dockerfiles/ubuntu-24.04.dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index fc59f22..5d46cf3 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -34,6 +34,15 @@ RUN apt update -y \ patchelf \ pciutils \ python3-pip \ + python3-setuptools \ + python3-wheel \ + python3-gnureadline \ + python3-boto3 \ + python3-pyyaml \ + python3-pytz \ + python3-minio \ + python3-requests \ + python3-clingo \ rsync \ unzip \ wget \ @@ -44,10 +53,6 @@ RUN apt update -y \ && ln -s /usr/bin/gpg /usr/bin/gpg2 \ && ln -s `which python3` /usr/bin/python -RUN python -m pip install --user pip setuptools wheel \ - && python -m pip install --user gnureadline boto3 pyyaml pytz minio requests clingo \ - && rm -rf ~/.cache - CMD ["/bin/bash"] ENV NVIDIA_VISIBLE_DEVICES=all \ From 24080737b0d7945885aac0c627b29cad62980012 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 6 Aug 2024 16:32:14 +0200 Subject: [PATCH 5/9] Use a venv --- Dockerfiles/ubuntu-24.04.dockerfile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index 5d46cf3..4be7b93 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -34,15 +34,6 @@ RUN apt update -y \ patchelf \ pciutils \ python3-pip \ - python3-setuptools \ - python3-wheel \ - python3-gnureadline \ - python3-boto3 \ - python3-pyyaml \ - python3-pytz \ - python3-minio \ - python3-requests \ - python3-clingo \ rsync \ unzip \ wget \ @@ -53,6 +44,13 @@ RUN apt update -y \ && ln -s /usr/bin/gpg /usr/bin/gpg2 \ && ln -s `which python3` /usr/bin/python +ENV VIRTUAL_ENV=/opt/view +RUN python3 -m venv /opt/venv +ENV PATH="$VIRTUAL_ENV/bin:$PATH" +RUN python3 -m pip install --upgrade pip setuptools wheel \ + && python3 -m pip install gnureadline boto3 pyyaml pytz minio requests clingo \ + && rm -rf ~/.cache + CMD ["/bin/bash"] ENV NVIDIA_VISIBLE_DEVICES=all \ From 983eed3cf9ce83fcb5dd24df4eb685ff9c52d44e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 6 Aug 2024 17:42:14 +0200 Subject: [PATCH 6/9] Add venv --- Dockerfiles/ubuntu-24.04.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index 4be7b93..0eeb3f1 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -34,6 +34,7 @@ RUN apt update -y \ patchelf \ pciutils \ python3-pip \ + python3-venv \ rsync \ unzip \ wget \ From f32ee121559c2ad88e0856adace847abf02f1d69 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 7 Aug 2024 08:36:47 +0200 Subject: [PATCH 7/9] python3 -> python --- Dockerfiles/ubuntu-24.04.dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index 0eeb3f1..ed90729 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -46,10 +46,10 @@ RUN apt update -y \ && ln -s `which python3` /usr/bin/python ENV VIRTUAL_ENV=/opt/view -RUN python3 -m venv /opt/venv +RUN python -m venv /opt/venv ENV PATH="$VIRTUAL_ENV/bin:$PATH" -RUN python3 -m pip install --upgrade pip setuptools wheel \ - && python3 -m pip install gnureadline boto3 pyyaml pytz minio requests clingo \ +RUN python -m pip install --upgrade pip setuptools wheel \ + && python -m pip install gnureadline boto3 pyyaml pytz minio requests clingo \ && rm -rf ~/.cache CMD ["/bin/bash"] From 4e05404a58cf4af917d611a3057eb520453302fa Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 8 Aug 2024 19:06:32 +0200 Subject: [PATCH 8/9] Fix typo in venv name --- Dockerfiles/ubuntu-24.04.dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index ed90729..341f0c5 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -33,8 +33,7 @@ RUN apt update -y \ patch \ patchelf \ pciutils \ - python3-pip \ - python3-venv \ + python3-full \ rsync \ unzip \ wget \ @@ -45,11 +44,11 @@ RUN apt update -y \ && ln -s /usr/bin/gpg /usr/bin/gpg2 \ && ln -s `which python3` /usr/bin/python -ENV VIRTUAL_ENV=/opt/view -RUN python -m venv /opt/venv +ENV VIRTUAL_ENV=/opt/venv +RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" -RUN python -m pip install --upgrade pip setuptools wheel \ - && python -m pip install gnureadline boto3 pyyaml pytz minio requests clingo \ +RUN python3 -m pip install --upgrade pip setuptools wheel \ + && python3 -m pip install gnureadline boto3 pyyaml pytz minio requests clingo \ && rm -rf ~/.cache CMD ["/bin/bash"] From 863b23071d9e149028e5c8bc2d185cf7911add56 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 8 Aug 2024 20:57:57 +0200 Subject: [PATCH 9/9] Python.h needed to build gnureadline from source --- Dockerfiles/ubuntu-24.04.dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfiles/ubuntu-24.04.dockerfile b/Dockerfiles/ubuntu-24.04.dockerfile index 341f0c5..09aca53 100644 --- a/Dockerfiles/ubuntu-24.04.dockerfile +++ b/Dockerfiles/ubuntu-24.04.dockerfile @@ -34,6 +34,7 @@ RUN apt update -y \ patchelf \ pciutils \ python3-full \ + python3-dev \ rsync \ unzip \ wget \