I am trying to make my repository as reproducible as possible, and after a discussion with ChatGPT I thought it would be a good idea to use conda with an environment.yml file instead of a requirements.txt. However, it does not work. Now, I would like to know what the best state-of-the-art way is to go.
From my discussion with ChatGPT my understanding about pip vs conda was as follows: Pip is only a Python package manager. Libraries like cuda contains binaries and create compatibility constraints based on other specs like CUDA drivers and the operating system. These specs are ignored when I use pip, to make it work also have to specify a wheel. Conda, however, also checks this extended set of compatibility constraints, can figure out the dependencies and finds an appropriate wheel for you.
In my concrete case I have to install torch, torch-geometric and torch-scatter. Using conda this results in a CPU wheel or a conflict during the env creation, depending on where you set fixed versions in the .env file. Apparently, conda can not find a suitable solution, even though there is one that is working. When I started my project, I found a way with pip to combine all packages using trial and error. I paste the requirements below.
**
Now I would like to know:
- Was my understanding about pip/conda wrong?
- What is the cleanest solution?**
The requirements (working with pip and a small trick) :
torch 2.6.0+cu124
torch_cluster 1.6.3+pt26cu124
torch-geometric 2.7.0
torch_scatter 2.1.2+pt26cu124
torch_sparse 0.6.18+pt26cu124
torch_spline_conv 1.2.2+pt26cu124
torchaudio 2.6.0
torchvision 0.21.0
nvidia-cublas-cu12 12.4.5.8
nvidia-cuda-cupti-cu12 12.4.127
nvidia-cuda-nvrtc-cu12 12.4.127
nvidia-cuda-runtime-cu12 12.4.127
nvidia-cudnn-cu12 9.1.0.70
nvidia-cufft-cu12 11.2.1.3
nvidia-curand-cu12 10.3.5.147
nvidia-cusolver-cu12 11.6.1.9
nvidia-cusparse-cu12 12.3.1.170
nvidia-cusparselt-cu12 0.6.2
nvidia-nccl-cu12 2.21.5
nvidia-nvjitlink-cu12 12.4.127
nvidia-nvtx-cu12 12.4.127