Skip to content

Commit ad57523

Browse files
mv venv to /usr/local/share
1 parent 3c555e1 commit ad57523

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

debian/Dockerfile

+11-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ RUN apt-get update \
2626
libomp-dev \
2727
doxygen\
2828
python3-pip python3-dev python3-venv \
29-
&& python3.11 -m venv .venv \
29+
&& python3.11 -m venv /usr/local/share/venv \
30+
&& . /usr/local/share/venv/bin/activate \
31+
&& python -m pip install --no-cache-dir --upgrade\
3032
&& .venv/bin/python -m pip install --no-cache-dir --upgrade\
3133
pip pytest wheel setuptools cmakelang scipy numpy \
3234
&& rm -rf /var/lib/apt/lists/*
@@ -50,7 +52,8 @@ RUN mkdir /tmp/openmpi-src \
5052
&& make all ${OPENMPI_MAKE_OPTIONS} \
5153
&& make install \
5254
&& cd && rm -rf /tmp/openmpi-src && ldconfig \
53-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
55+
&& . /usr/local/share/venv/bin/activate \
56+
&& python -m pip install --no-cache-dir mpi4py
5457

5558
#### ADD DEFAULT USER ####
5659
ARG USER=mpi
@@ -80,7 +83,8 @@ RUN mkdir /tmp/openmpi-src \
8083
&& make all ${OPENMPI_MAKE_OPTIONS} \
8184
&& make install \
8285
&& cd && rm -rf /tmp/openmpi-src && ldconfig \
83-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
86+
&& . /usr/local/share/venv/bin/activate \
87+
&& python -m pip install --no-cache-dir mpi4py
8488

8589
#### ADD DEFAULT USER ####
8690
ARG USER=mpi
@@ -110,7 +114,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \
110114
&& make ${MPICH_MAKE_OPTIONS} \
111115
&& make install \
112116
&& cd && rm -rf /tmp/mpich-src && ldconfig \
113-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
117+
&& . /usr/local/share/venv/bin/activate \
118+
&& python -m pip install --no-cache-dir mpi4py
114119

115120
#### ADD DEFAULT USER ####
116121
ARG USER=mpi
@@ -140,7 +145,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \
140145
&& make ${MPICH_MAKE_OPTIONS} \
141146
&& make install \
142147
&& cd && rm -rf /tmp/mpich-src && ldconfig \
143-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
148+
&& . /usr/local/share/venv/bin/activate \
149+
&& python -m pip install --no-cache-dir mpi4py
144150

145151
#### ADD DEFAULT USER ####
146152
ARG USER=mpi

ubuntu/Dockerfile

+11-6
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ RUN apt-get update \
2424
libomp-dev \
2525
doxygen\
2626
python3-pip python3-dev python3-venv \
27-
&& python3.12 -m venv .venv \
28-
&& .venv/bin/python -m pip install --no-cache-dir --upgrade\
27+
&& python3.12 -m venv /usr/local/share/venv \
28+
&& . /usr/local/share/venv/bin/activate \
29+
&& python -m pip install --no-cache-dir --upgrade\
2930
pip pytest wheel setuptools cmakelang scipy numpy \
3031
&& rm -rf /var/lib/apt/lists/*
3132

@@ -50,7 +51,8 @@ RUN mkdir /tmp/openmpi-src \
5051
&& make all ${OPENMPI_MAKE_OPTIONS} \
5152
&& make install \
5253
&& cd && rm -rf /tmp/openmpi-src && ldconfig \
53-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
54+
&& . /usr/local/share/venv/bin/activate \
55+
&& python -m pip install --no-cache-dir mpi4py
5456

5557
#### ADD DEFAULT USER ####
5658
ARG USER=mpi
@@ -80,7 +82,8 @@ RUN mkdir /tmp/openmpi-src \
8082
&& make all ${OPENMPI_MAKE_OPTIONS} \
8183
&& make install \
8284
&& cd && rm -rf /tmp/openmpi-src && ldconfig \
83-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
85+
&& . /usr/local/share/venv/bin/activate \
86+
&& python -m pip install --no-cache-dir mpi4py
8487

8588
#### ADD DEFAULT USER ####
8689
ARG USER=mpi
@@ -111,7 +114,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \
111114
&& make ${MPICH_MAKE_OPTIONS} \
112115
&& make install \
113116
&& cd && rm -rf /tmp/mpich-src && ldconfig \
114-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
117+
&& . /usr/local/share/venv/bin/activate \
118+
&& python -m pip install --no-cache-dir mpi4py
115119

116120
#### ADD DEFAULT USER ####
117121
ARG USER=mpi
@@ -140,7 +144,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \
140144
&& make ${MPICH_MAKE_OPTIONS} \
141145
&& make install \
142146
&& cd && rm -rf /tmp/mpich-src && ldconfig \
143-
&& .venv/bin/python -m pip install --no-cache-dir mpi4py
147+
&& . /usr/local/share/venv/bin/activate \
148+
&& python -m pip install --no-cache-dir mpi4py
144149

145150
#### ADD DEFAULT USER ####
146151
ARG USER=mpi

0 commit comments

Comments
 (0)