From ad575237bcc430ca5da3d212d6f2a0211118e31a Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Tue, 30 Jul 2024 09:40:08 +0200 Subject: [PATCH] mv venv to /usr/local/share --- debian/Dockerfile | 16 +++++++++++----- ubuntu/Dockerfile | 17 +++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 7aa36c0..9e2c61c 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -26,7 +26,9 @@ RUN apt-get update \ libomp-dev \ doxygen\ python3-pip python3-dev python3-venv \ - && python3.11 -m venv .venv \ + && python3.11 -m venv /usr/local/share/venv \ + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir --upgrade\ && .venv/bin/python -m pip install --no-cache-dir --upgrade\ pip pytest wheel setuptools cmakelang scipy numpy \ && rm -rf /var/lib/apt/lists/* @@ -50,7 +52,8 @@ RUN mkdir /tmp/openmpi-src \ && make all ${OPENMPI_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/openmpi-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi @@ -80,7 +83,8 @@ RUN mkdir /tmp/openmpi-src \ && make all ${OPENMPI_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/openmpi-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi @@ -110,7 +114,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \ && make ${MPICH_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/mpich-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi @@ -140,7 +145,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \ && make ${MPICH_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/mpich-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index ee0e0c4..c27f8c2 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -24,8 +24,9 @@ RUN apt-get update \ libomp-dev \ doxygen\ python3-pip python3-dev python3-venv \ - && python3.12 -m venv .venv \ - && .venv/bin/python -m pip install --no-cache-dir --upgrade\ + && python3.12 -m venv /usr/local/share/venv \ + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir --upgrade\ pip pytest wheel setuptools cmakelang scipy numpy \ && rm -rf /var/lib/apt/lists/* @@ -50,7 +51,8 @@ RUN mkdir /tmp/openmpi-src \ && make all ${OPENMPI_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/openmpi-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi @@ -80,7 +82,8 @@ RUN mkdir /tmp/openmpi-src \ && make all ${OPENMPI_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/openmpi-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi @@ -111,7 +114,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \ && make ${MPICH_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/mpich-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi @@ -140,7 +144,8 @@ RUN mkdir /tmp/mpich-src && cd /tmp/mpich-src \ && make ${MPICH_MAKE_OPTIONS} \ && make install \ && cd && rm -rf /tmp/mpich-src && ldconfig \ - && .venv/bin/python -m pip install --no-cache-dir mpi4py + && . /usr/local/share/venv/bin/activate \ + && python -m pip install --no-cache-dir mpi4py #### ADD DEFAULT USER #### ARG USER=mpi