chao1224 / MoleculeSTM

Multi-modal Molecule Structure-text Model for Text-based Editing and Retrieval, Nat Mach Intell 2023 (https://www.nature.com/articles/s42256-023-00759-6)
https://chao1224.github.io/MoleculeSTM
Other
188 stars 18 forks source link

Current conda environment setup instructions do not work #22

Open amelie-iska opened 4 months ago

amelie-iska commented 4 months ago

The current instructions for creating a conda environment does not work. In particular, issues arise with pytorch and pytorch-geometric. I have attempted installing with pip instead using:

pip3 install torch==1.9.1 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu111 --no-cache-dir

However, getting the version of pytorch-geometric to match has proven difficult. Using conda as in the install instructions to install pytorch-geometric always disrupts the pytorch version that is installed and causes downstream incompatibilities. I've tried using pip, but neither of the following commands work:

pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-1.9.1+cu111.html
pip3 install torch_geometric torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-1.9.1+cu111.html
chao1224 commented 4 months ago

Hi @amelie-iska, can you help list the exception messages?

eskin22 commented 3 months ago

Hey @amelie-iska, I faced the exact same issue and after a good deal of tinkering I think I found a workaround. Basically what I did was restart the installation from scratch with a modified installation for PyTorch.

Specifically, I changed:

conda install -y -c conda-forge -c pytorch pytorch=1.9.1

to:

conda install pytorch==1.9.1 torchvision==0.10.1 torchaudio==0.9.1 cudatoolkit=11.1 -c pytorch -c nvidia

I believe this approach is similar to what you were trying, but it allowed me to finish installing apex without any errors. The issue I saw was that PyTorch was not recognizing a CUDA runtime, even if you had CUDA_HOME exported as an environment variable elsewhere on your machine.

Hopefully this helps solve your issue or can help anyone else currently struggling with getting setup.

amelie-iska commented 3 months ago

Thanks for the tip @eskin22 really appreciate this! I will give this a try shortly and see how it goes and report back if there are any issues.