@@ -851,7 +851,7 @@ jobs:
851851 # Seems like we will need to install build-essential for resolving nbconvert issue `RuntimeError: Unsupported compiler -- at least C++11 support is needed!`"
852852 # Given here: https://github.com/NVIDIA/cuda-quantum/blob/main/docs/sphinx/applications/python/qchem/cppe_lib.py#L18
853853 # and https://github.com/jupyter/nbconvert/issues/1742
854- sudo apt-get update && sudo apt-get install build-essential python3-dev -y
854+ sudo apt-get update && sudo apt-get install -y build-essential python3-dev python3-venv python3-pip
855855
856856 backends_to_test=`\
857857 for file in $(ls $CUDA_QUANTUM_PATH/targets/*.yml); \
@@ -964,24 +964,15 @@ jobs:
964964 dpkg -i cuda-keyring_1.1-1_all.deb
965965 cuda_version_suffix="$(echo ${{ matrix.cuda_version }} | tr . -)"
966966 apt-get update
967- if [ $(echo ${{ matrix.cuda_version }} | cut -d . -f1) -gt 11 ]; then
968- apt-get install -y --no-install-recommends \
969- cuda-cudart-$cuda_version_suffix \
970- cuda-nvrtc-$cuda_version_suffix \
971- libnvjitlink-$cuda_version_suffix \
972- libcurand-$cuda_version_suffix \
973- libcublas-$cuda_version_suffix \
974- libcusparse-$cuda_version_suffix \
975- libcusolver-$cuda_version_suffix
976- else
977- apt-get install -y --no-install-recommends \
978- cuda-cudart-$cuda_version_suffix \
979- cuda-nvrtc-$cuda_version_suffix \
980- libcurand-$cuda_version_suffix \
981- libcublas-$cuda_version_suffix \
982- libcusparse-$cuda_version_suffix \
983- libcusolver-$cuda_version_suffix
984- fi
967+ apt-get install -y --no-install-recommends \
968+ cuda-cudart-$cuda_version_suffix \
969+ cuda-cudart-dev-$cuda_version_suffix \
970+ cuda-nvrtc-$cuda_version_suffix \
971+ libnvjitlink-$cuda_version_suffix \
972+ libcurand-$cuda_version_suffix \
973+ libcublas-$cuda_version_suffix \
974+ libcusparse-$cuda_version_suffix \
975+ libcusolver-$cuda_version_suffix
985976
986977 - name : Runtime dependencies (dnf)
987978 if : startsWith(matrix.os_image, 'redhat')
@@ -1048,7 +1039,7 @@ jobs:
10481039 strategy :
10491040 matrix :
10501041 platform : ['amd64-gpu-a100', 'arm64-gpu-a100']
1051- cuda_major : ['', '11 ', '12 ']
1042+ cuda_major : ['', '12 ', '13 ']
10521043 fail-fast : false
10531044
10541045 runs-on : linux-${{ matrix.platform }}-latest-1
@@ -1086,20 +1077,22 @@ jobs:
10861077 # These simple steps are only expected to work for
10871078 # test cases that don't require MPI.
10881079 # Create clean python3 environment.
1089- apt-get update && apt-get install -y --no-install-recommends python3 python3-pip
1090- mkdir -p /tmp/packages && mv /tmp/wheels/* /tmp/packages && rmdir /tmp/wheels
1080+ apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-venv
10911081
1092- python3 -m pip install pypiserver
1093- server=`find / -name pypi-server -executable -type f`
1094- $server run -p 8080 /tmp/packages &
1082+ # Make a place for local wheels
1083+ mkdir -p /tmp/packages && mv /tmp/wheels/* /tmp/packages && rmdir /tmp/wheels
10951084
1085+ # Create and activate virtual environment
1086+ python3 -m venv /opt/cudaq-venv
1087+ source /opt/cudaq-venv/bin/activate
1088+
10961089 if [ -n "${{ matrix.cuda_major }}" ]; then
10971090 pip install cuda-quantum-cu${{ matrix.cuda_major }}==${{ needs.assets.outputs.cudaq_version }} -v \
1098- --extra-index-url http ://localhost:8080
1091+ --find-links "file :///tmp/packages"
10991092 else
11001093 pip install --upgrade pip
11011094 pip install cudaq==${{ needs.assets.outputs.cudaq_version }} -v \
1102- --extra-index-url http ://localhost:8080 \
1095+ --find-links "file :///tmp/packages" \
11031096 2>&1 | tee /tmp/install.out
11041097
11051098 if [ -z "$(cat /tmp/install.out | grep -o 'Autodetection succeeded')" ]; then
@@ -1143,7 +1136,10 @@ jobs:
11431136
11441137 strategy :
11451138 matrix :
1146- cuda_version : ['12.4', '13.0']
1139+ # Note: this is the version of the conda 'nvidia/label/cuda' channel.
1140+ # Specifically, 'nvidia/label/cuda-13.0.0' does not contain proper CUDA 13 packages,
1141+ # hence we need to use later channels.
1142+ cuda_version_conda : ['12.6.0', '13.0.2']
11471143 fail-fast : false
11481144
11491145 # Must have environment to access environment secreats
@@ -1203,10 +1199,10 @@ jobs:
12031199 source validate_pycudaq.sh \
12041200 -v ${{ needs.assets.outputs.cudaq_version }} \
12051201 -i /tmp/packages -f /tmp \
1206- -c ${{ matrix.cuda_version }} -p 3.12
1202+ -c ${{ matrix.cuda_version_conda }} -p 3.12
12071203 set -e # Re-enable exit code error checking
12081204
1209- expected_dependency=cuda-quantum-cu$(echo ${{ matrix.cuda_version }} | cut -d . -f1)
1205+ expected_dependency=cuda-quantum-cu$(echo ${{ matrix.cuda_version_conda }} | cut -d . -f1)
12101206 if [ -z "$(python3 -m pip list | grep ${expected_dependency})" ]; then
12111207 echo "::error::Missing installation of ${expected_dependency} package."
12121208 exit 1
0 commit comments