faiss icon indicating copy to clipboard operation
faiss copied to clipboard

faiss-gpu 1.7.4 install failure

Open zhiyuanpeng opened this issue 1 year ago • 1 comments

Summary

I follow the official instruction to install faiss-gpu along with pytorch and cuda. I got this error when I run my program:

UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 11040). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org/ to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at /opt/conda/conda-bld/pytorch_1699449200967/work/c10/cuda/CUDAFunctions.cpp:108.)
  return torch._C._cuda_getDeviceCount() > 0

command nvidia-smi shows:

NVIDIA-SMI 470.57.02    Driver Version: 470.57.02    CUDA Version: 11.4

In my conda env, there is no cuda 11040 at all:

cuda-cudart               12.1.105                      0    nvidia
cuda-cupti                12.1.105                      0    nvidia
cuda-libraries            12.1.0                        0    nvidia
cuda-nvrtc                12.1.105                      0    nvidia
cuda-nvtx                 12.1.105                      0    nvidia
cuda-opencl               12.3.101                      0    nvidia
cuda-runtime              12.1.0                        0    nvidia
cudatoolkit               11.4.1               h8ab8bb3_9    nvidia
pytorch                   2.1.1           py3.9_cuda12.1_cudnn8.9.2_0    pytorch
pytorch-cuda              12.1                 ha16c6d3_5    pytorch

Platform

OS: Debian 10

Faiss version: 1.7.4

Installed from: conda install faiss-gpu=1.7.4 mkl=2021 pytorch pytorch-cuda numpy -c pytorch -c nvidia

Faiss compilation options: see above

Running on: GPU v100 (same error on A100)

Interface: Python 3.10

Reproduction instructions

create a conda python 3.10 env and install faiss-gpu 1.7.4 by command:

conda install faiss-gpu=1.7.4 mkl=2021 pytorch pytorch-cuda numpy -c pytorch -c nvidia

zhiyuanpeng avatar Dec 04 '23 20:12 zhiyuanpeng

I suggest forcing pytorch-cuda and cudatoolkit to 11.8:

conda install faiss-gpu=1.7.4 mkl=2021 pytorch pytorch-cuda=11.8 cudatoolkit=11.8 numpy -c pytorch -c nvidia

Let me know if this works.

algoriddle avatar Dec 05 '23 17:12 algoriddle