Installation of DGl with Pytorch compatibility

System Info:

  • Ubuntu 22.04.5, x86_64, jammy_jellyfish
  • CUDA GPU GA106 GeForce RTX 3060
  • gcc 11.4.0
  • NVIDIA driver version 560.35.03
  • CUDA version 12.6

Steps:

  1. new conda environment
  2. use previous Pytorch version:

conda install pytorch==2.2.1 torchvision==0.17.1 pytorch-cuda=12.1 -c pytorch -c nvidia — to install pytorch 2.2.1 with cuda 12.1

  1. had problem with numpy, install numpy again,

pip install "“numpy<2”

  1. install dgl 2.4.0,

pip install dgl -f https://data.dgl.ai/wheels/torch-2.2/cu121/repo.html

This is working for the time being. Not the latest version of numpy, pytorch and dgl.