Use same pytorch pinnings as openmm-torch
{% set name = "openmmtorchplugin" %}
{% set version = "1.0.0" %}
+# see github.com/conda-forge/conda-forge.github.io/issues/1059 for naming discussion
+{% set torch_proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %}
+
package:
name: {{ name|lower }}
version: {{ version }}
@@ -15,6 +18,7 @@ build:
string: cpu_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
skip: true # [cuda_compiler_version in (undefined, 'None', '10.2')]
skip: true # [not linux]
+ # Set rpaths we need to link against libtorch.so, but it is located in site-packages
rpaths:
- lib/
- {{ SP_DIR }}/torch/lib
@@ -27,30 +31,30 @@ requirements:
- {{ cdt('mesa-libgl-devel') }} # [linux]
- cmake
- make
-
-
- host:
- - python
- - pip
- swig
+ host:
+ - khronos-opencl-icd-loader # [osx]
+ - ocl-icd # [linux]
- openmm
+ - pip
+ - python
+ # First for global version pin, second for build variant
- pytorch
- - cudatoolkit # [cuda_compiler_version not in (undefined, 'None')]
- - ocl-icd # [linux]
- - khronos-opencl-icd-loader # [osx]
+ - pytorch =*={{ torch_proc_type }}*
run:
- - python
- - {{ pin_compatible('pytorch-gpu', max_pin='x.x.x') }} # [cuda_compiler_version not in (undefined, 'None')]
- - {{ pin_compatible('pytorch-cpu', max_pin='x.x.x') }} # [osx]
+ - khronos-opencl-icd-loader # [osx]
- {{ pin_compatible('openmm', max_pin='x.x') }}
- ocl-icd # [linux]
- ocl-icd-system # [linux]
- - khronos-opencl-icd-loader # [osx]
- ocl_icd_wrapper_apple # [osx]
+ - python
+ run_constrained:
+ - pytorch =*={{ torch_proc_type }}*
test:
imports:
- torchintegratorplugin
+
about:
home: https://github.com/SCMusson/openmmtorchplugin
license: GPL-3.0-only
