When running Haystack with GPU I am getting the following error. After digging into it, I realize that Haystack is downgrading Pytorch to a version that isn't compatible with my CUDA.
NVIDIA GeForce RTX 3060 with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70. If you want to use the NVIDIA GeForce RTX 3060 GPU with PyTorch, please check the instructions at
Steps to reproduce Haystack downgrading Pytorch
Create a fresh environment with conda Install Pytorch 1.13 (pip3 install torch torchvision torchaudio) Check Torch and Cuda versions
>>> torch.__version__
'1.13.0'
>>> torch.version.cuda
'11.7'
Install Haystack (pip3 install 'farm-haystack[docstores-gpu,faiss-gpu]'). The installer using an old version of Torch Collecting torch<1.13,>1.9 Using cached torch-1.12.1-cp38-cp38-manylinux1_x86_64.whl (776.3 MB) Checking Torch and Cuda versions
>>> torch.__version__
'1.12.1+cu102'
>>> torch.version.cuda
'10.2'
There are two solutions
1. Using light-the-torch
a. Create an environment b. Install light-the-torch (ltt) https://pypi.org/project/light-the-torch/ c. Installing Pytorch with the version Haystack support using ltt. Ltt will install the right CUDA version.
d. Check the version of Pytorch and CUDA
2. Installing From Source
Here is the solution I come up with installing from the source and configuring the Pytorch version.
Installing FARM and specifying Pytorch version
Installing Haystack forces it to use a specific Pytorch version
Checking Torch version