cudaErrorInvalidDevice: invalid device ordinal

We have the following environment:

spaCy version 3.7.4
Location C:\Program Files\Python\Lib\site-packages\spacy
Platform Windows-2022Server-10.0.20348-SP0
Python version 3.12.3
Pipelines en_core_web_lg (3.7.1), en_core_web_md (3.7.1), en_core_web_sm (3.7.1), en_core_web_trf (3.7.3)

We’ve installed CUDA v12.4 and the GPU is set up as follows:

±----------------------------------------------------------------------------------------+
| NVIDIA-SMI 551.78 Driver Version: 551.78 CUDA Version: 12.4 |
|-----------------------------------------±-----------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 Tesla T4 TCC | 00000001:00:00.0 Off | 0 |
| N/A 35C P8 13W / 70W | 9MiB / 15360MiB | 0% Default |
| | | N/A |
±----------------------------------------±-----------------------±---------------------+

We get the error "cudaErrorInvalidDevice: invalid device ordinal’ back from spaCy when executing the following line of code:

doc = nlp(text)

We have set spaCy to use the gpu:

spacy.prefer_gpu()

Any ideas as to why this error is occurring and how we can resolve it?

Thanks in advance.