Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda-forge builds do not install properly on linux without CUDA #94

Open
sef43 opened this issue Jan 17, 2023 · 5 comments
Open

conda-forge builds do not install properly on linux without CUDA #94

sef43 opened this issue Jan 17, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@sef43
Copy link

sef43 commented Jan 17, 2023

I am using a linux machine which does not have CUDA and does not have NVIDIA GPUS. When I install the latest version of opemm-torch and openmm using this command:

mamba install -c conda-forge -c "conda-forge/label/openmm-torch_rc" -c "conda-forge/label/openmm_rc" openmm=8 openmm-torch=1

I get errors when importing openmmtorch:

python
Python 3.11.0 | packaged by conda-forge | (main, Jan 14 2023, 12:27:40) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openmmtorch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/export/users/sfarr/miniconda3/envs/test_rc/lib/python3.11/site-packages/openmmtorch.py", line 15, in <module>
    import _openmmtorch
ImportError: libtorch_cuda.so: cannot open shared object file: No such file or directory

I think this is because conda installs these incompatible packages:

openmm-torch              1.0rc1          cuda112py311h756f8fe_0    conda-forge/label/openmm-torch_rc
pytorch                   1.13.1          cpu_py311h410fd25_0    conda-forge

openmm-torch uses a pytorch cuda version, but the pytorch installed is a cpu only version.

@raimis
Copy link
Contributor

raimis commented Jan 17, 2023

@sef43
Copy link
Author

sef43 commented Jan 17, 2023

Should we put this workaround on the README install guide?

@peastman
Copy link
Member

Users shouldn't need a workaround. It ought to automatically install compatible packages.

@sef43
Copy link
Author

sef43 commented Jan 18, 2023

As I understand it that would require us providing a conda-forge build of openmm-torch that is built against, and depends on, conda-forge pytorch-*-cpu. The pytorch-*-gpu versions on conda-forge have a dependency on __cuda so can only be installed by conda if the user has a CUDA installation or overrides the CUDA detection.

@raimis raimis added the help wanted Extra attention is needed label Sep 22, 2023
@sef43 sef43 changed the title conda-forge rc builds do not install properly on linux without CUDA conda-forge builds do not install properly on linux without CUDA Nov 2, 2023
@sef43
Copy link
Author

sef43 commented Nov 2, 2023

This is still a problem with the 1.4 release.
It is the same as the issues on the feedstock: conda-forge/openmm-torch-feedstock#37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants