diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index e74d397f1d5..42089d8f0fc 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -840,9 +840,10 @@ jobs: docker cp docs/notebook_validation.py cuda-quantum:"/home/cudaq/notebook_validation.py" # In containers without GPU support, UCX does not work properly since it is configured to work with GPU-support. # Hence, don't enforce UCX when running these tests. - docker exec cuda-quantum bash -c "python3 -m pip install --break-system-packages pandas scipy seaborn h5py contfrac" docker exec cuda-quantum bash -c "sudo apt install -y python3-venv" - (docker exec cuda-quantum bash -c "unset OMPI_MCA_pml && set -o pipefail && bash validate_container.sh | tee /tmp/validation.out") && passed=true || passed=false + docker exec cuda-quantum bash -lc "python3 -m venv /opt/cudaq-venv" + docker exec cuda-quantum bash -lc "source /opt/cudaq-venv/bin/activate && pip install pandas scipy seaborn h5py contfrac" + (docker exec cuda-quantum bash -c "source /opt/cudaq-venv/bin/activate && nset OMPI_MCA_pml && set -o pipefail && bash validate_container.sh | tee /tmp/validation.out") && passed=true || passed=false docker cp cuda-quantum:"/tmp/validation.out" /tmp/validation.out docker stop cuda-quantum diff --git a/docker/build/devdeps.Dockerfile b/docker/build/devdeps.Dockerfile index 5a9e0205049..bb80847051c 100644 --- a/docker/build/devdeps.Dockerfile +++ b/docker/build/devdeps.Dockerfile @@ -58,7 +58,7 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1 RUN apt-get update && apt-get install -y --no-install-recommends \ wget git unzip \ python3-dev python3-pip && \ - python3 -m pip install --no-cache-dir numpy --break-system-packages && \ + python3 -m pip install --no-cache-dir numpy && \ apt-get autoremove -y --purge && apt-get clean && rm -rf /var/lib/apt/lists/* ADD scripts/install_toolchain.sh /cuda-quantum/scripts/install_toolchain.sh RUN source /cuda-quantum/scripts/install_toolchain.sh \ @@ -156,7 +156,7 @@ ENV PATH="${PATH}:/usr/local/cmake-3.28/bin" RUN apt-get update && apt-get install -y --no-install-recommends \ git gdb ninja-build file lldb \ python3 python3-pip libpython3-dev \ - && python3 -m pip install --no-cache-dir --break-system-packages \ + && python3 -m pip install --no-cache-dir \ lit==18.1.4 pytest==8.2.0 numpy==1.26.4 requests==2.31.0 \ fastapi==0.111.0 uvicorn==0.29.0 pydantic==2.7.1 llvmlite==0.42.0 \ pyspelling==2.10 pymdown-extensions==10.8.1 yapf \ @@ -167,7 +167,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY --from=prereqs /usr/local/bin/doxygen /usr/local/bin/doxygen ENV PATH="${PATH}:/usr/local/bin" RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip pandoc aspell aspell-en \ - && python3 -m pip install --no-cache-dir --break-system-packages \ + && python3 -m pip install --no-cache-dir \ ipython==8.15.0 pandoc==2.3 sphinx==5.3.0 sphinx_rtd_theme==1.2.0 sphinx-reredirects==0.1.2 \ sphinx-copybutton==0.5.2 sphinx_inline_tabs==2023.4.21 enum-tools[sphinx] breathe==4.34.0 \ nbsphinx==0.9.2 sphinx_gallery==0.13.0 myst-parser==1.0.0 ipykernel==6.29.4 notebook==7.3.2 \ diff --git a/docker/build/devdeps.ext.Dockerfile b/docker/build/devdeps.ext.Dockerfile index 151aa94f5c7..67fb2e3479f 100644 --- a/docker/build/devdeps.ext.Dockerfile +++ b/docker/build/devdeps.ext.Dockerfile @@ -183,7 +183,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ else \ cupy_version=13.4.1; \ fi && \ - python3 -m pip install --break-system-packages cupy-cuda$(echo $CUDA_VERSION | cut -d . -f1)x==${cupy_version} cuquantum-cu$(echo $CUDA_VERSION | cut -d . -f1)==25.09.1 && \ + python3 -m pip install cupy-cuda$(echo $CUDA_VERSION | cut -d . -f1)x==${cupy_version} cuquantum-cu$(echo $CUDA_VERSION | cut -d . -f1)==25.09.1 && \ if [ "$(python3 --version | grep -o [0-9\.]* | cut -d . -f -2)" != "3.12" ]; then \ echo "expecting Python version 3.12"; \ fi diff --git a/docker/build/devdeps.ompi.Dockerfile b/docker/build/devdeps.ompi.Dockerfile index ad1a730af59..bd6639bead8 100644 --- a/docker/build/devdeps.ompi.Dockerfile +++ b/docker/build/devdeps.ompi.Dockerfile @@ -34,7 +34,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gcc g++ gfortran python3 python3-pip \ libcurl4-openssl-dev libssl-dev liblapack-dev libpython3-dev \ bzip2 make sudo vim curl git wget \ - && pip install --no-cache-dir numpy --break-system-packages \ + && pip install --no-cache-dir numpy \ && apt-get autoremove -y --purge && apt-get clean && rm -rf /var/lib/apt/lists/* # 2 - Install SLURM PMI2 version 21.08.8 diff --git a/docker/release/cudaq.Dockerfile b/docker/release/cudaq.Dockerfile index dfd8797e882..39dfbb31af9 100644 --- a/docker/release/cudaq.Dockerfile +++ b/docker/release/cudaq.Dockerfile @@ -58,11 +58,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \ libstdc++-13-dev python3 python3-pip adduser \ && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* \ - && python3 -m pip install --no-cache-dir --break-system-packages numpy scipy \ + && python3 -m pip install --no-cache-dir numpy scipy \ && ln -s /bin/python3 /bin/python RUN apt-get update && apt-get install -y --no-install-recommends gcc g++ python3-dev \ # Ref: https://github.com/qutip/qutip/issues/2412 - && python3 -m pip install --no-cache-dir --break-system-packages notebook==7.3.2 "qutip<5" matplotlib \ + && python3 -m pip install --no-cache-dir notebook==7.3.2 "qutip<5" matplotlib \ && apt-get remove -y gcc g++ python3-dev \ && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*