CuVec icon indicating copy to clipboard operation
CuVec copied to clipboard

build: conda-forge

Open casperdcl opened this issue 1 year ago • 0 comments

potential alternative to #27:

conda-forge (CUDA and non-CUDA) recipe for the parallelproj projectors (libparallelproj) [...]: https://github.com/conda-forge/parallelproj-feedstock

The main things I learned/had to reali[s]e where:

  1. All your dependencies need to be on conda-forge
  2. For handling cuda in the meta.yaml, there is # [cuda_compiler_version != "None"] "decorator" to describe cuda/non-cuda specific things
  3. at runtime you need the virtual __cuda conda-forge package as dependency which helps the package manager to figure out which package version needs to be / can be installed on systems with and without cuda https://github.com/conda-forge/parallelproj-feedstock/blob/af55c92209af12cfad72f03078c24d0f0412045b/recipe/meta.yaml#L47
  4. for the builds there are no physical GPUs available meaning that all tests requiring GPUs need to be skipped (this might change in the future)
  5. In the build scripts, you can test the ${cuda_compiler_version} to trigger CUDA / non-cuda specific things https://github.com/conda-forge/parallelproj-feedstock/blob/af55c92209af12cfad72f03078c24d0f0412045b/recipe/build-parallelproj.sh#L7

I think the recipe for libparallelproj is a good starting point. Note that libparallelproj in the meta.yaml I build two packages (libparallelproj with CUDA and non-CUDA version, and also parallelproj which is a minimal python interface to the libs).

The conda-forge team on gitter.im also helped me a lot in the beginning.

— @gschramm

casperdcl avatar Feb 19 '24 11:02 casperdcl