From 78cd9608d6c7b6077341c3a51541bbc157d00309 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 12 Jul 2023 18:36:49 +0300 Subject: [PATCH 1/3] Run `./bootstrap.sh` in a venv --- bootstrap.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index f87027d4a1..b18f7a0dd3 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -83,6 +83,17 @@ if $python -c 'import sys; sys.exit(sys.version_info[:2] >= (3, 6))'; then exit 1 fi +venvdir=$(mktemp -d) +CMD $python -m venv $venvdir +CMD source $venvdir/bin/activate + +_shutdown_venv() { + deactivate + /bin/rm -rf $venvdir +} + +trap _shutdown_venv EXIT + # Disable the user installation scheme which is the default for Debian and # cannot be combined with `--target` export PIP_USER=0 From fd081a6e2c9308664e4d5dfeab45481428210108 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Wed, 12 Jul 2023 18:55:49 +0300 Subject: [PATCH 2/3] Install python3-venv in Ubuntu containers --- ci-scripts/dockerfiles/Lmod-base.dockerfile | 2 +- ci-scripts/dockerfiles/Lmod77-base.dockerfile | 2 +- ci-scripts/dockerfiles/Spack.dockerfile | 2 +- ci-scripts/dockerfiles/Tmod4-base.dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-scripts/dockerfiles/Lmod-base.dockerfile b/ci-scripts/dockerfiles/Lmod-base.dockerfile index 6ead08e747..ab5d5617af 100644 --- a/ci-scripts/dockerfiles/Lmod-base.dockerfile +++ b/ci-scripts/dockerfiles/Lmod-base.dockerfile @@ -9,7 +9,7 @@ RUN \ apt-get -y update && \ apt-get -y install ca-certificates && \ update-ca-certificates && \ - apt-get -y install gcc make git python3 python3-pip + apt-get -y install gcc make git python3 python3-pip python3-venv # Required utilities RUN apt-get -y install wget diff --git a/ci-scripts/dockerfiles/Lmod77-base.dockerfile b/ci-scripts/dockerfiles/Lmod77-base.dockerfile index 53238abab4..0bea9b030f 100644 --- a/ci-scripts/dockerfiles/Lmod77-base.dockerfile +++ b/ci-scripts/dockerfiles/Lmod77-base.dockerfile @@ -15,7 +15,7 @@ RUN \ apt-get -y update && \ apt-get -y install ca-certificates && \ update-ca-certificates && \ - apt-get -y install gcc make git python3 python3-pip + apt-get -y install gcc make git python3 python3-pip python3-venv # Required utilities RUN apt-get -y install wget diff --git a/ci-scripts/dockerfiles/Spack.dockerfile b/ci-scripts/dockerfiles/Spack.dockerfile index f7e93a1418..dbfe8ba162 100644 --- a/ci-scripts/dockerfiles/Spack.dockerfile +++ b/ci-scripts/dockerfiles/Spack.dockerfile @@ -19,7 +19,7 @@ RUN \ apt-get -y install gcc && \ apt-get -y install make && \ apt-get -y install git && \ - apt-get -y install python3 python3-pip + apt-get -y install python3 python3-pip python3-venv # Install ReFrame from the current directory COPY --chown=rfmuser . /home/rfmuser/reframe/ diff --git a/ci-scripts/dockerfiles/Tmod4-base.dockerfile b/ci-scripts/dockerfiles/Tmod4-base.dockerfile index bdea0bb358..072b82a32a 100644 --- a/ci-scripts/dockerfiles/Tmod4-base.dockerfile +++ b/ci-scripts/dockerfiles/Tmod4-base.dockerfile @@ -9,7 +9,7 @@ RUN \ apt-get -y update && \ apt-get -y install ca-certificates && \ update-ca-certificates && \ - apt-get -y install gcc make git python3 python3-pip + apt-get -y install gcc make git python3 python3-pip python3-venv # Required utilities RUN apt-get -y install wget From f60e27841d29f5fd135617f5e310c6ce32a41045 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Thu, 13 Jul 2023 17:04:08 +0300 Subject: [PATCH 3/3] Install python3-venv in the Test Flux workflow --- .github/workflows/test-flux.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-flux.yaml b/.github/workflows/test-flux.yaml index 09f8333c47..bf29b70362 100644 --- a/.github/workflows/test-flux.yaml +++ b/.github/workflows/test-flux.yaml @@ -19,7 +19,7 @@ jobs: name: ${{ matrix.container }} steps: - name: Make Space - run: | + run: | rm -rf /usr/share/dotnet rm -rf /opt/ghc @@ -28,6 +28,7 @@ jobs: - name: Install Reframe run: | + apt-get update && apt-get install -y python3-venv /bin/bash ./bootstrap.sh export PATH=$PWD/bin:$PATH which reframe @@ -36,7 +37,7 @@ jobs: - name: Start Flux and Run Test run: | export PATH=$PWD/bin:$PATH - which reframe + which reframe flux start reframe -c tutorials/flux -C tutorials/flux/settings.py -l flux start reframe -c tutorials/flux -C tutorials/flux/settings.py --run flux start python3 ./test_reframe.py --rfm-user-config=tutorials/flux/settings.py -vvvv