CuVec
CuVec copied to clipboard
build: conda-forge
potential alternative to #27:
conda-forge (CUDA and non-CUDA) recipe for the
parallelprojprojectors (libparallelproj) [...]: https://github.com/conda-forge/parallelproj-feedstockThe main things I learned/had to reali[s]e where:
- All your dependencies need to be on conda-forge
- For handling cuda in the
meta.yaml, there is# [cuda_compiler_version != "None"]"decorator" to describe cuda/non-cuda specific things- at runtime you need the virtual
__cudaconda-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- 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)
- 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#L7I think the recipe for
libparallelprojis a good starting point. Note thatlibparallelprojin themeta.yamlI build two packages (libparallelprojwith CUDA and non-CUDA version, and alsoparallelprojwhich is a minimal python interface to the libs).The conda-forge team on gitter.im also helped me a lot in the beginning.
— @gschramm