openmm-torch icon indicating copy to clipboard operation
openmm-torch copied to clipboard

Improve build from source instructions

Open sef43 opened this issue 2 years ago • 5 comments

Address #64

  • Provides a conda environment file
  • update build instructions in README

sef43 avatar Nov 11 '22 13:11 sef43

These instructions seem to be Linux specific. We also support Mac and Windows. Note that conda-forge does not currently provide PyTorch builds for WIndows, so in that case it's necessary to get it from the PyTorch website or the pytorch conda channel.

peastman avatar Nov 11 '22 17:11 peastman

I have made specific instructions for Linux (with and without CUDA) and MacOS. One issue is that I think the conda-forge NNPOps only has linux with cuda versions available

sef43 avatar Nov 14 '22 13:11 sef43

We should put the from-source installation instructions to a separate file (e.g. INSTALL.md) and link it from the main READM.md. Most users can install with conda, so they don't need to be distracted.

raimis avatar Nov 14 '22 13:11 raimis

One issue is that I think the conda-forge NNPOps only has linux with cuda versions available

That's because conda-forge doesn't provide PyTorch builds for Windows. That makes building from source especially important, since it's the only option for Windows.

peastman avatar Nov 14 '22 17:11 peastman

For instructions for a building on Windows we will need to update PythonInstall and python/setup.py etc to work with windows. I am not familiar enough with the build system/Windows to do this.

I have been able to compile the c++ code on Windows (CPU only) using visual studio and this environment:

name: build
channels:
  - conda-forge
  - pytorch
dependencies:
  - openmm >=7.7
  - pip
  - pytest
  - python
  - pytorch::pytorch
  - pytorch::cpuonly 
  - swig <4.1

One quirk is that pytorch requires MKL, but the conda mkl for me did not seem to have all the files needed to compile so I had to download the full MKL installer from intel.

sef43 avatar Nov 17 '22 13:11 sef43