From 8046fe92afe4548a6b8c9d10663465e9973dafec Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 10:25:39 -0800 Subject: [PATCH 01/14] Adding steps to cache qutip wheel Signed-off-by: Sachin Pisal --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++- .github/workflows/docker_images.yml | 14 +++++++++ docker/build/cudaq.dev.Dockerfile | 10 +++++++ docker/release/cudaq.Dockerfile | 12 +++++++- 4 files changed, 78 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d3c94c5aa..106040ea7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -211,9 +211,38 @@ jobs: devdeps_archive: ${{ fromJson(needs.config.outputs.json).tar_archive[format('{0}-{1}', matrix.platform, matrix.toolchain)] }} export_environment: ${{ github.event_name == 'workflow_dispatch' && inputs.export_environment }} + cache_qutip_wheel: + name: Build and Cache qutip Wheel + runs-on: ubuntu-latest + strategy: + matrix: + platform: [amd64, arm64] + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + + - name: Build qutip Wheel + run: | + mkdir -p wheelhouse + python -m pip wheel qutip --wheel-dir=./wheelhouse + ls -lh ./wheelhouse + + - name: Upload Wheel Artifact + uses: actions/upload-artifact@v4 + with: + name: qutip-wheel-${{ matrix.platform }} + path: ./wheelhouse + retention-days: 7 + docker_image: name: Create Docker images - needs: config + needs: [config, cache_qutip_wheel] strategy: matrix: platform: [amd64, arm64] @@ -227,6 +256,19 @@ jobs: devdeps_image: ${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-gcc11', matrix.platform)] }} devdeps_cache: ${{ fromJson(needs.config.outputs.json).cache_key[format('{0}-gcc11', matrix.platform)] }} devdeps_archive: ${{ fromJson(needs.config.outputs.json).tar_archive[format('{0}-gcc11', matrix.platform)] }} + steps: + - name: Download Cached qutip Wheel + uses: actions/download-artifact@v4 + with: + name: qutip-wheel-${{ matrix.platform }} + path: ./wheelhouse + + - name: Build Docker Image + run: | + docker build \ + --build-arg QUTIP_WHEEL=./wheelhouse/qutip*.whl \ + --build-arg DEVDEPS_IMAGE=${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-gcc11', matrix.platform)] }} \ + --tag myrepo/cudaq:${{ matrix.platform }} . python_wheels: name: Create Python wheels diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 0e62b2a302..d92a5d0643 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -321,6 +321,12 @@ jobs: org.opencontainers.image.title=cuda-quantum-dev org.opencontainers.image.description=Dev environment for CUDA Quantum (debug build) + - name: Download Cached qutip Wheel + uses: actions/download-artifact@v4 + with: + name: qutip-wheel-${{ inputs.platforms }} + path: ./wheelhouse + - name: Build cuda-quantum-dev image (debug) id: docker_build uses: docker/build-push-action@v5 @@ -329,6 +335,7 @@ jobs: file: ./docker/build/cudaq.dev.Dockerfile build-args: | base_image=${{ steps.prereqs.outputs.base_image }} + QUTIP_WHEEL=./wheelhouse/qutip*.whl install="CMAKE_BUILD_TYPE=Debug" git_source_sha=${{ github.sha }} tags: ${{ steps.metadata.outputs.tags }} @@ -582,6 +589,12 @@ jobs: run: | docker run --privileged multiarch/qemu-user-static:latest --reset -p yes --credential yes + - name: Download Cached qutip Wheel + uses: actions/download-artifact@v4 + with: + name: qutip-wheel-${{ inputs.platforms }} + path: ./wheelhouse + - name: Build cuda-quantum image id: cudaq_build if: success() && !cancelled() @@ -592,6 +605,7 @@ jobs: build-args: | cudaqdev_image=${{ steps.prereqs.outputs.dev_image_name }}@${{ steps.release_build.outputs.digest }} base_image=${{ steps.prereqs.outputs.base_image }} + QUTIP_WHEEL=./wheelhouse/qutip*.whl release_version=${{ steps.prereqs.outputs.image_tag }} tags: ${{ steps.cudaq_metadata.outputs.tags }} labels: ${{ steps.cudaq_metadata.outputs.labels }} diff --git a/docker/build/cudaq.dev.Dockerfile b/docker/build/cudaq.dev.Dockerfile index 509362a1ab..561533cf4a 100644 --- a/docker/build/cudaq.dev.Dockerfile +++ b/docker/build/cudaq.dev.Dockerfile @@ -30,6 +30,16 @@ ARG destination="$CUDAQ_REPO_ROOT" ADD "$workspace" "$destination" WORKDIR "$destination" +# Accept QUTIP_WHEEL as a build argument +ARG QUTIP_WHEEL + +# Install qutip from the wheel if provided +RUN if [ -n "$QUTIP_WHEEL" ]; then \ + pip install "$QUTIP_WHEEL"; \ + else \ + pip install qutip; \ + fi + # mpich or openmpi ARG mpi= RUN if [ -n "$mpi" ]; \ diff --git a/docker/release/cudaq.Dockerfile b/docker/release/cudaq.Dockerfile index 5e4c945890..6f1a63106e 100644 --- a/docker/release/cudaq.Dockerfile +++ b/docker/release/cudaq.Dockerfile @@ -62,10 +62,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && 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 notebook==7.1.3 "qutip<5" matplotlib \ + && python3 -m pip install --no-cache-dir notebook==7.1.3 matplotlib \ && apt-get remove -y gcc g++ python3-dev \ && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* +# Accept QUTIP_WHEEL as a build argument +ARG QUTIP_WHEEL + +# Install qutip from the wheel if provided +RUN if [ -n "$QUTIP_WHEEL" ]; then \ + pip install "$QUTIP_WHEEL"; \ + else \ + pip install qutip; \ + fi + # Copy over the CUDA-Q installation, and the necessary compiler tools. ARG release_version= From cd0d613f7a9e98d2b7d7627884dca0e96a84fc72 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 10:28:14 -0800 Subject: [PATCH 02/14] reverting changes from ci.yml Signed-off-by: Sachin Pisal --- .github/workflows/ci.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 106040ea7b..4af65665c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -256,19 +256,6 @@ jobs: devdeps_image: ${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-gcc11', matrix.platform)] }} devdeps_cache: ${{ fromJson(needs.config.outputs.json).cache_key[format('{0}-gcc11', matrix.platform)] }} devdeps_archive: ${{ fromJson(needs.config.outputs.json).tar_archive[format('{0}-gcc11', matrix.platform)] }} - steps: - - name: Download Cached qutip Wheel - uses: actions/download-artifact@v4 - with: - name: qutip-wheel-${{ matrix.platform }} - path: ./wheelhouse - - - name: Build Docker Image - run: | - docker build \ - --build-arg QUTIP_WHEEL=./wheelhouse/qutip*.whl \ - --build-arg DEVDEPS_IMAGE=${{ fromJson(needs.config.outputs.json).image_hash[format('{0}-gcc11', matrix.platform)] }} \ - --tag myrepo/cudaq:${{ matrix.platform }} . python_wheels: name: Create Python wheels From 0af7e4f13745c503432f86e98bd021ad8b952c17 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 11:37:08 -0800 Subject: [PATCH 03/14] correcting platform name Signed-off-by: Sachin Pisal --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4af65665c0..1d61ff9896 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -236,7 +236,7 @@ jobs: - name: Upload Wheel Artifact uses: actions/upload-artifact@v4 with: - name: qutip-wheel-${{ matrix.platform }} + name: qutip-wheel-linux/${{ matrix.platform }} path: ./wheelhouse retention-days: 7 From f2532d6b6be4782f9ac2c4bd0b01138429a318ba Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 13:39:12 -0800 Subject: [PATCH 04/14] Substituting / with - Signed-off-by: Sachin Pisal --- .github/workflows/ci.yml | 2 +- .github/workflows/docker_images.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d61ff9896..96704dd89b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -236,7 +236,7 @@ jobs: - name: Upload Wheel Artifact uses: actions/upload-artifact@v4 with: - name: qutip-wheel-linux/${{ matrix.platform }} + name: qutip-wheel-linux-${{ matrix.platform }} path: ./wheelhouse retention-days: 7 diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index d92a5d0643..903e382bb5 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -324,7 +324,7 @@ jobs: - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-${{ inputs.platforms }} + name: qutip-wheel-${{ inputs.platforms }} | sed 's/\//-/g' path: ./wheelhouse - name: Build cuda-quantum-dev image (debug) @@ -592,7 +592,7 @@ jobs: - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-${{ inputs.platforms }} + name: qutip-wheel-${{ inputs.platforms }} | sed 's/\//-/g' path: ./wheelhouse - name: Build cuda-quantum image From bf62d7a5cdef6e108f948a9b4373b0e1e9885737 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 14:01:17 -0800 Subject: [PATCH 05/14] correcting name Signed-off-by: Sachin Pisal --- .github/workflows/docker_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 903e382bb5..5bc6e70c8b 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -324,7 +324,7 @@ jobs: - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-${{ inputs.platforms }} | sed 's/\//-/g' + name: qutip-wheel-$(echo "${{ inputs.platforms }}" | sed 's/\//-/g') path: ./wheelhouse - name: Build cuda-quantum-dev image (debug) @@ -592,7 +592,7 @@ jobs: - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-${{ inputs.platforms }} | sed 's/\//-/g' + name: qutip-wheel-$(echo "${{ inputs.platforms }}" | sed 's/\//-/g') path: ./wheelhouse - name: Build cuda-quantum image From 2780e669ea18045ab3bf54f54936215388c9a42b Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 14:18:04 -0800 Subject: [PATCH 06/14] fixing name Signed-off-by: Sachin Pisal --- .github/workflows/docker_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 5bc6e70c8b..02e48f46ce 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -324,7 +324,7 @@ jobs: - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-$(echo "${{ inputs.platforms }}" | sed 's/\//-/g') + name: qutip-wheel-`echo "${{ inputs.platforms }}" | sed 's/\//-/g'` path: ./wheelhouse - name: Build cuda-quantum-dev image (debug) @@ -592,7 +592,7 @@ jobs: - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-$(echo "${{ inputs.platforms }}" | sed 's/\//-/g') + name: qutip-wheel-`echo "${{ inputs.platforms }}" | sed 's/\//-/g'` path: ./wheelhouse - name: Build cuda-quantum image From 3fd1621657629126fd18f8299df7069f1879a34f Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 14:53:18 -0800 Subject: [PATCH 07/14] using env var Signed-off-by: Sachin Pisal --- .github/workflows/docker_images.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 02e48f46ce..0a3448883f 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -321,10 +321,16 @@ jobs: org.opencontainers.image.title=cuda-quantum-dev org.opencontainers.image.description=Dev environment for CUDA Quantum (debug build) + - name: Transform Platform Name + id: transform_platform + run: | + transformed_platform=$(echo "${{ inputs.platforms }}" | sed 's/\//-/g') + echo "transformed_platform=$transformed_platform" >> $GITHUB_ENV + - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-`echo "${{ inputs.platforms }}" | sed 's/\//-/g'` + name: qutip-wheel-${{ env.transformed_platform }} path: ./wheelhouse - name: Build cuda-quantum-dev image (debug) @@ -589,10 +595,16 @@ jobs: run: | docker run --privileged multiarch/qemu-user-static:latest --reset -p yes --credential yes + - name: Transform Platform Name + id: transform_platform + run: | + transformed_platform=$(echo "${{ inputs.platforms }}" | sed 's/\//-/g') + echo "transformed_platform=$transformed_platform" >> $GITHUB_ENV + - name: Download Cached qutip Wheel uses: actions/download-artifact@v4 with: - name: qutip-wheel-`echo "${{ inputs.platforms }}" | sed 's/\//-/g'` + name: qutip-wheel-${{ env.transformed_platform }} path: ./wheelhouse - name: Build cuda-quantum image From 437020c0aaef8967d7301d72423232fda8fd5e73 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 15:22:01 -0800 Subject: [PATCH 08/14] fixing wheel path Signed-off-by: Sachin Pisal --- .github/workflows/ci.yml | 6 ++---- .github/workflows/docker_images.yml | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96704dd89b..eef45fb2fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -229,15 +229,13 @@ jobs: - name: Build qutip Wheel run: | - mkdir -p wheelhouse - python -m pip wheel qutip --wheel-dir=./wheelhouse - ls -lh ./wheelhouse + python -m pip wheel qutip --wheel-dir=/tmp/wheels - name: Upload Wheel Artifact uses: actions/upload-artifact@v4 with: name: qutip-wheel-linux-${{ matrix.platform }} - path: ./wheelhouse + path: /tmp/wheels retention-days: 7 docker_image: diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 0a3448883f..da4383e199 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -331,7 +331,7 @@ jobs: uses: actions/download-artifact@v4 with: name: qutip-wheel-${{ env.transformed_platform }} - path: ./wheelhouse + path: /tmp/wheels - name: Build cuda-quantum-dev image (debug) id: docker_build @@ -341,7 +341,7 @@ jobs: file: ./docker/build/cudaq.dev.Dockerfile build-args: | base_image=${{ steps.prereqs.outputs.base_image }} - QUTIP_WHEEL=./wheelhouse/qutip*.whl + QUTIP_WHEEL=/tmp/wheels/qutip*.whl install="CMAKE_BUILD_TYPE=Debug" git_source_sha=${{ github.sha }} tags: ${{ steps.metadata.outputs.tags }} @@ -605,7 +605,7 @@ jobs: uses: actions/download-artifact@v4 with: name: qutip-wheel-${{ env.transformed_platform }} - path: ./wheelhouse + path: /tmp/wheels - name: Build cuda-quantum image id: cudaq_build @@ -617,7 +617,7 @@ jobs: build-args: | cudaqdev_image=${{ steps.prereqs.outputs.dev_image_name }}@${{ steps.release_build.outputs.digest }} base_image=${{ steps.prereqs.outputs.base_image }} - QUTIP_WHEEL=./wheelhouse/qutip*.whl + QUTIP_WHEEL=/tmp/wheels/qutip*.whl release_version=${{ steps.prereqs.outputs.image_tag }} tags: ${{ steps.cudaq_metadata.outputs.tags }} labels: ${{ steps.cudaq_metadata.outputs.labels }} From 7c623bff5160cafc19365e075cae894b9c00cd31 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Fri, 20 Dec 2024 15:42:16 -0800 Subject: [PATCH 09/14] correcting qutip wheel path Signed-off-by: Sachin Pisal --- .github/workflows/docker_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index da4383e199..0f4d0a9f0c 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -341,7 +341,7 @@ jobs: file: ./docker/build/cudaq.dev.Dockerfile build-args: | base_image=${{ steps.prereqs.outputs.base_image }} - QUTIP_WHEEL=/tmp/wheels/qutip*.whl + QUTIP_WHEEL=/tmp/wheels/qutip-wheel-${{ env.transformed_platform }}.whl install="CMAKE_BUILD_TYPE=Debug" git_source_sha=${{ github.sha }} tags: ${{ steps.metadata.outputs.tags }} @@ -617,7 +617,7 @@ jobs: build-args: | cudaqdev_image=${{ steps.prereqs.outputs.dev_image_name }}@${{ steps.release_build.outputs.digest }} base_image=${{ steps.prereqs.outputs.base_image }} - QUTIP_WHEEL=/tmp/wheels/qutip*.whl + QUTIP_WHEEL=/tmp/wheels/qutip-wheel-${{ env.transformed_platform }}.whl release_version=${{ steps.prereqs.outputs.image_tag }} tags: ${{ steps.cudaq_metadata.outputs.tags }} labels: ${{ steps.cudaq_metadata.outputs.labels }} From 6ba7d1cdda96bacb8d006aa39a660837ad035058 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Mon, 23 Dec 2024 10:50:44 -0800 Subject: [PATCH 10/14] setting qutip version < 5 Signed-off-by: Sachin Pisal --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eef45fb2fb..f91fc69e2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -229,7 +229,7 @@ jobs: - name: Build qutip Wheel run: | - python -m pip wheel qutip --wheel-dir=/tmp/wheels + python -m pip wheel "qutip<5" --wheel-dir=/tmp/wheels - name: Upload Wheel Artifact uses: actions/upload-artifact@v4 From be2cb06ddb36d9013cd4160ce239255de3d332f7 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Mon, 23 Dec 2024 13:03:46 -0800 Subject: [PATCH 11/14] passing a generic qutip whl Signed-off-by: Sachin Pisal --- .github/workflows/docker_images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 0f4d0a9f0c..ca8d23238d 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -341,7 +341,7 @@ jobs: file: ./docker/build/cudaq.dev.Dockerfile build-args: | base_image=${{ steps.prereqs.outputs.base_image }} - QUTIP_WHEEL=/tmp/wheels/qutip-wheel-${{ env.transformed_platform }}.whl + QUTIP_WHEEL=/tmp/wheels/qutip-*.whl install="CMAKE_BUILD_TYPE=Debug" git_source_sha=${{ github.sha }} tags: ${{ steps.metadata.outputs.tags }} @@ -617,7 +617,7 @@ jobs: build-args: | cudaqdev_image=${{ steps.prereqs.outputs.dev_image_name }}@${{ steps.release_build.outputs.digest }} base_image=${{ steps.prereqs.outputs.base_image }} - QUTIP_WHEEL=/tmp/wheels/qutip-wheel-${{ env.transformed_platform }}.whl + QUTIP_WHEEL=/tmp/wheels/qutip-*.whl release_version=${{ steps.prereqs.outputs.image_tag }} tags: ${{ steps.cudaq_metadata.outputs.tags }} labels: ${{ steps.cudaq_metadata.outputs.labels }} From 1264b76cbe613ca167aef574517487647b18b3d7 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Mon, 23 Dec 2024 14:42:00 -0800 Subject: [PATCH 12/14] Adding support to expand the wildcard Signed-off-by: Sachin Pisal --- docker/build/cudaq.dev.Dockerfile | 2 +- docker/release/cudaq.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/build/cudaq.dev.Dockerfile b/docker/build/cudaq.dev.Dockerfile index 561533cf4a..8ba203930c 100644 --- a/docker/build/cudaq.dev.Dockerfile +++ b/docker/build/cudaq.dev.Dockerfile @@ -35,7 +35,7 @@ ARG QUTIP_WHEEL # Install qutip from the wheel if provided RUN if [ -n "$QUTIP_WHEEL" ]; then \ - pip install "$QUTIP_WHEEL"; \ + pip install $(ls $QUTIP_WHEEL); \ else \ pip install qutip; \ fi diff --git a/docker/release/cudaq.Dockerfile b/docker/release/cudaq.Dockerfile index 6f1a63106e..a77900515e 100644 --- a/docker/release/cudaq.Dockerfile +++ b/docker/release/cudaq.Dockerfile @@ -71,7 +71,7 @@ ARG QUTIP_WHEEL # Install qutip from the wheel if provided RUN if [ -n "$QUTIP_WHEEL" ]; then \ - pip install "$QUTIP_WHEEL"; \ + pip install $(ls $QUTIP_WHEEL); \ else \ pip install qutip; \ fi From 03623c61feb9006485229ab6b235d93083627d90 Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Mon, 23 Dec 2024 16:24:13 -0800 Subject: [PATCH 13/14] checking with echo Signed-off-by: Sachin Pisal --- docker/build/cudaq.dev.Dockerfile | 2 +- docker/release/cudaq.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/build/cudaq.dev.Dockerfile b/docker/build/cudaq.dev.Dockerfile index 8ba203930c..4a6c645c04 100644 --- a/docker/build/cudaq.dev.Dockerfile +++ b/docker/build/cudaq.dev.Dockerfile @@ -35,7 +35,7 @@ ARG QUTIP_WHEEL # Install qutip from the wheel if provided RUN if [ -n "$QUTIP_WHEEL" ]; then \ - pip install $(ls $QUTIP_WHEEL); \ + pip install $(echo $QUTIP_WHEEL); \ else \ pip install qutip; \ fi diff --git a/docker/release/cudaq.Dockerfile b/docker/release/cudaq.Dockerfile index a77900515e..0818412e26 100644 --- a/docker/release/cudaq.Dockerfile +++ b/docker/release/cudaq.Dockerfile @@ -71,7 +71,7 @@ ARG QUTIP_WHEEL # Install qutip from the wheel if provided RUN if [ -n "$QUTIP_WHEEL" ]; then \ - pip install $(ls $QUTIP_WHEEL); \ + pip install $(echo $QUTIP_WHEEL); \ else \ pip install qutip; \ fi From f3294405e73c2e7d9ffe83205096622656a1633b Mon Sep 17 00:00:00 2001 From: Sachin Pisal Date: Tue, 24 Dec 2024 14:58:14 -0800 Subject: [PATCH 14/14] extracting qutip wheel after downloading it Signed-off-by: Sachin Pisal --- .github/workflows/docker_images.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index ca8d23238d..7596854a9e 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -607,6 +607,11 @@ jobs: name: qutip-wheel-${{ env.transformed_platform }} path: /tmp/wheels + - name: Extract qutip Wheel + run: | + mkdir -p /tmp/wheels + unzip /tmp/wheels/qutip-wheel-${{ env.transformed_platform }}.zip -d /tmp/wheels + - name: Build cuda-quantum image id: cudaq_build if: success() && !cancelled()