Skip to content

Commit 71342a7

Browse files
authored
Merge pull request #2953 from vkarak/bugfix/bootstrap-venv
[enhancement] Run `./bootstrap.sh` in a virtual environment
2 parents 3d2fb4d + f60e278 commit 71342a7

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

.github/workflows/test-flux.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
name: ${{ matrix.container }}
2020
steps:
2121
- name: Make Space
22-
run: |
22+
run: |
2323
rm -rf /usr/share/dotnet
2424
rm -rf /opt/ghc
2525
@@ -28,6 +28,7 @@ jobs:
2828

2929
- name: Install Reframe
3030
run: |
31+
apt-get update && apt-get install -y python3-venv
3132
/bin/bash ./bootstrap.sh
3233
export PATH=$PWD/bin:$PATH
3334
which reframe
@@ -36,7 +37,7 @@ jobs:
3637
- name: Start Flux and Run Test
3738
run: |
3839
export PATH=$PWD/bin:$PATH
39-
which reframe
40+
which reframe
4041
flux start reframe -c tutorials/flux -C tutorials/flux/settings.py -l
4142
flux start reframe -c tutorials/flux -C tutorials/flux/settings.py --run
4243
flux start python3 ./test_reframe.py --rfm-user-config=tutorials/flux/settings.py -vvvv

bootstrap.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ if $python -c 'import sys; sys.exit(sys.version_info[:2] >= (3, 6))'; then
8383
exit 1
8484
fi
8585

86+
venvdir=$(mktemp -d)
87+
CMD $python -m venv $venvdir
88+
CMD source $venvdir/bin/activate
89+
90+
_shutdown_venv() {
91+
deactivate
92+
/bin/rm -rf $venvdir
93+
}
94+
95+
trap _shutdown_venv EXIT
96+
8697
# Disable the user installation scheme which is the default for Debian and
8798
# cannot be combined with `--target`
8899
export PIP_USER=0

ci-scripts/dockerfiles/Lmod-base.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99
apt-get -y update && \
1010
apt-get -y install ca-certificates && \
1111
update-ca-certificates && \
12-
apt-get -y install gcc make git python3 python3-pip
12+
apt-get -y install gcc make git python3 python3-pip python3-venv
1313

1414
# Required utilities
1515
RUN apt-get -y install wget

ci-scripts/dockerfiles/Lmod77-base.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN \
1515
apt-get -y update && \
1616
apt-get -y install ca-certificates && \
1717
update-ca-certificates && \
18-
apt-get -y install gcc make git python3 python3-pip
18+
apt-get -y install gcc make git python3 python3-pip python3-venv
1919

2020
# Required utilities
2121
RUN apt-get -y install wget

ci-scripts/dockerfiles/Spack.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN \
1919
apt-get -y install gcc && \
2020
apt-get -y install make && \
2121
apt-get -y install git && \
22-
apt-get -y install python3 python3-pip
22+
apt-get -y install python3 python3-pip python3-venv
2323

2424
# Install ReFrame from the current directory
2525
COPY --chown=rfmuser . /home/rfmuser/reframe/

ci-scripts/dockerfiles/Tmod4-base.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN \
99
apt-get -y update && \
1010
apt-get -y install ca-certificates && \
1111
update-ca-certificates && \
12-
apt-get -y install gcc make git python3 python3-pip
12+
apt-get -y install gcc make git python3 python3-pip python3-venv
1313

1414
# Required utilities
1515
RUN apt-get -y install wget

0 commit comments

Comments
 (0)